Google AdSense Split Testing
Please subscribe to ProTycoon.com via the RSS Feed or Via Email.
Split Testing or A/B Testing is the process of testing 2 Ad units at the same time on a website or blog to see which one performs the best. It works by rotating the ads on around a 50/50 basis so that one visitor might see one Ad and the next visitor could see another. When run over a reasonable period of time you can judge which Ad unit performs best on your blog.
Everyone would like to know what their best performing Ad units are and this is how you can find out. When testing Ad units you want the test to run with all things being as close to equal as possible, that is why the Ads need to be used at the same time, if you did one test one week, then another the next there could be a big difference in traffic and content, which could affect earnings, so by keeping things as close to equal as possible your AdSense Split Testing will be more accurate.
Now we need to look at how you can do Split Testing on your blog. The easiest way is to use this small piece of PHP code that I use to run my Google AdSense Split Testing:
<?php
srand((double)microtime()*1000000);
if (rand(1,2)==1)
{
Ad Unit 1 Goes Here
}
else
{
Ad Unit 2 Goes Here
};
?>
The code works out a random number then depending on the number shows Ad Unit 1 or Ad Unit 2. This should produce results of around 50/50 as it is just like flipping a coin.
The technique of split testing is used by many big blogs and websites including some of my own. If you refresh this page the Ad Unit below may change, as it is currently using the above script:
Warning: include(http://www.protycoon.com/split.php) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/adzeds/public_html/wp-content/plugins/phpexec.php(78) : eval()’d code on line 2
Warning: include() [function.include]: Failed opening ‘http://www.protycoon.com/split.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/adzeds/public_html/wp-content/plugins/phpexec.php(78) : eval()’d code on line 2
It is recommended that you use the same size AdSense units, but change colors, borders and corners, to see which has the most positive effect. Once you have found the most profitable Ad colors, you can try using a different Ad Unit size and seeing if that performs better or worse.
My advice is to test as many colors and size on your blog until you find the most profitable, then leave that unit running for a few months, then start testing again, as trends change, and you need to keep on top to keep your blog earning well.
Let us know of your experiences with Google AdSense Split Testing.










Roger | June 2nd, 2008 at 10:58 pm #
This code didnt work in my template.
David Shaw | June 3rd, 2008 at 12:24 pm #
You could try adding the code in a separate file and then calling that file?
Maybe using a PHP Include? See if that works.
Roger | June 3rd, 2008 at 12:59 pm #
thanks
David Shaw | June 3rd, 2008 at 1:43 pm #
No Worries
Roger | June 24th, 2008 at 7:33 pm #
Hello please could you help me with - google adsense or adword API where could get entire documentation and implementation of it.
Thanks
Roger
David Shaw | June 24th, 2008 at 10:50 pm #
Can you explain what exactly it is you are after?
Cheers