How to Perform A/B Testing of Adsense Ads for Higher CTR

By 28-06-2011   AdvertisingBloggingTutorials

A/B testing is the best way to determine which Google Adsense format will get the highest CTR and help you make money online. Most webmasters and bloggers try standard configurations and limit their site’s earning potential. So how to perform A/B testing?

A/B Testing of Google Adsense Ads

You have noticed we run a 336×280 ad unit on every article. Now suppose we want to test different link colors to see which ad format works best – here is how to do it.

  1. Create  first ad unit of 336×280 with blue links.
  2. Assign it with custom channel, lets say ‘blue links’
  3. Create second ad unit of 336×280 with green links.
  4. Assign it with custom channel, lets say ‘green links’
  5. Use javascript code to rotate the ad unit to display alternate ads with blue and then green links and so on.
    <script type="text/javascript">
    var random_number = Math.random();
    if (random_number < .5){
    // first ad unit code
    } else {
    // second ad unit code
    }
    </script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
  6. Place the javascript code where you originally had place your ads.

Correct Code Use –  Remember that since the javascript code above already has the script tags, you need not cut paste the whole Adsense code, but only the part between the script tags. So this how the code will look like.

<script type="text/javascript">
var random_number = Math.random();
if (random_number < .5){
 <!--
 google_ad_client = "pub-99999999999999";
 google_ad_slot = "12345";
 google_ad_width = 336;
 google_ad_height = 280;
 //-->
} else {
 <!--
 google_ad_client = "pub-99999999999999";
 google_ad_slot = "123456789";
 google_ad_width = 336;
 google_ad_height = 280; 
 //-->
}
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

This is a very nice trick suggested by Adsense team itself and works very well – which means you need not worry about editing the Adsense code for A/B testing purposes only (which otherwise is not allowed as per Adsense guidelines).

Compare the channel reports in Adsense Reports after a week (it takes time to get useful results!) and see which channel has better CTR and  then use those links. You can modify the code and keep optimizing – change a new parameter now, like text color etc. and keep using this technique for highest CTR possible.

We got a higher CTR by this technique. Tell us you got better results…

3 comments on “How to Perform A/B Testing of Adsense Ads for Higher CTR

  1. Irfan@RealTimeTricks says:

    Just giving a try with Green and Black ad links. Hope the CTR gets increase!

  2. Tech Crates says:

    Wow…as you say it is suggested by adsense team itself, then I’ll surely give a try !! Who wants to leave the extra $$$

  3. Simon G says:

    I have seen this type of ad codes on many popular site .But I think that they have premium account of adsense .

Leave a Reply

Your email address will not be published. Required fields are marked *

*