Split Test Google Adsense Snippets

by Net-Income on January 7, 2009

“Increase your Google cheques by 500% by doing a little split testing.”

At the moment there are only a few ways to A versus B split testing Google Adsense. Fundamental codes including javascript and php will complete a very basic test between an Adsense code A and Adsense code B.

split-test-resultsTo set up a test, you first need to allocate a new Adsense Channel for each Adsense code you want to test. In my case I used a channel called “adsense-test1″ and also another channel called “adsense-test2″. Then I got the Adsense code for each channel. In my test, I was testing 2 identical ads except for some small changes in the colour scheme.

Insert 2 ads.

I also wanted the split test to be reasonably accurate, so I let it run for 1000 page views. Anything less than 1000 page views would make the results useless.

The first Google Adsense split test code we will look at using is javascript
Place the below code where you want the testing Adsense code to show.

<script type=”text/javascript”>
var choice = Math.round(Math.random());
if (choice) {
document.write(‘replace this text with the Adsense code of you 1st Ad here‘);
} else {
document.write(‘
replace this text with the Adsense code of you 2nd Ad here‘);
}
</script>

The second Google Adsense split test code alternative we will use is php
Place the below code where you want the testing Adsense code to show.

<?php
srand((double)microtime()*1000000);

if (rand(1,2)==1)
{
replace this text with the Adsense code of you 1st Ad here
}
else
{
replace this text with the Adsense code of you 1st Ad here
};
?>

Run each test for a minimum of 1000 page views. And before deleting the losing ad code, check your Google stats and make sure that the winning code had infact earnt you the most money. Some tests may prove to be successful with highier click through rate, but it’s how much your earn per click that counts. For example:

Code A recieved 100 clicks and earnt you $22.00 with a Page eCPM of $35
Code B recieved 75 clicks and earnt you $20.80 with a Page eCPM of $42

So in the above example, code B won the Adsense split test. It had less clicks, but it paid more per click.

Continue testing colour, size and position of your Google Adsense ads until you have doubled your income.

I have been working on a Plugin that will make this whole process easier. Check out my Google Adsense Split Tester pre-launch page.

Most Commented Posts

{ 5 comments… read them below or add one }

1 stefan February 10, 2009 at 1:04 am

hi, this looks very nice. but should we not compare eCPM with CTR as said here http://www.splittester.com/index.php.
regards
stefan

Current score: 0

2 Net-Income January 8, 2009 at 7:47 pm

I have just updated the post and added a more understandable code in both javascript and php. I hope you can understand it now.

Current score: 0

3 JaMina January 8, 2009 at 9:51 am

Thanks Steve

Current score: 0

4 Net-Income January 8, 2009 at 4:33 am

Jamina I should have gone into a bit more details.
I will add to the above article with a step by step.

Current score: 0

5 JaMina January 8, 2009 at 1:54 am

Hey Steve as always thanks for such great posts. Can you explain this one to me a bit more. Do I put each of the above codes on separate pages along with my existing google adsense code?

Does the section that says ‘AD CODE COLOR A’ AND ‘AD CODE COLOR B’ stay as it is or do I change that to something? And if so what? I’m not sure how I would add color to this section if that’s what this area is for, Google makes it very easy to change the color.

In the second code above what do I put in the area that says ‘Your Ad Unit A Goes Here’ and ‘Your Ad Unit B Goes Here’? Am I placing two ads in one code?

Current score: 2

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: