Google Adsense A/B testing

AB testing adsense profit

The recently published adjustments  to Google Adsense policies allows for certain adjustments of the Adsense Javascript code.

One of the new things available is A/B testing of different ad unit designs or formats.

In this post we’ll provide you with a couple of examples that can help you to optimize your Adsense earnings through A/B testing.

As a little teaser, we gained a 29% increase in Adsense earnings by testing a different color setup for a ad unit…

Get started

To start the test you should go to your Adsense account and create new ad units that represents the different things you would like to test.

It’s important to be very specific when you name the new ad units.

Examples of my preferred naming syntax:

  • 728 x 90 pixel ad unit with adsense standard colors => “728×90-standard”
  •  728 x 90 pixel ad unit with grey colors => “728×90-grey”

You get the picture right…

The most important thing is selecting a naming convention that makes it easy to identify the different test ad units, when we’re going to evaluate the test.

When the ad units has been created you’ll get a piece of standard javascript like this from Adsense:


<script type="text/javascript"><!--
google_ad_client = "ca-publisher-id";
<em id="__mceDel">/* 728x90-standard */
google_ad_slot = "6816819806";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Testing different ad unit colors

One obvious thing to test is how different layout of the ad unites effects the earnings.

In Adsense you can customize the following layout parameters of a ad unit:

  • Border color
  • Title color
  • Background color
  • Text color
  • Url color
  • Corner style (round/square)

When you have created 2 test variants of ad units with different color setup, you need to merge the codes to a common script that handles the test.

In this example the script test two color variations of a 728×90 pixels ad unit:


<script type="text/javascript">
var random_number = Math.random();
google_ad_client = "ca-publisher-id";
google_ad_width = 728;
google_ad_height = 90;

if (random_number < .5){
 /* 728x90-standard */
 google_ad_slot = "1234567890";

} else {

/* 728x90-grey */
google_ad_slot = "2345678901";

}

</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Testing different ad sizes

You can also test how different ad sizes performs by creating 2 adunits with different sizes. In the example below a 728×90 pixels unit is tested against a 970×90 pixels unit:


<script type="text/javascript">
var random_number = Math.random();
google_ad_client = "ca-publisher-id";

if (random_number < .5){
 /* 728x90-standard */
 google_ad_width = 728;
 google_ad_height = 90;
 google_ad_slot = "1234567890";

} else {

/* 970x90-standard */
 google_ad_width = 970;
 google_ad_height = 90;
 google_ad_slot = "0987654321";

}

</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Test results

When your test has been collecting a representive amount of data, it’s time to look at the results.

To see the performance per ad unit, log in to Adsense and go to  “Performance reports” in the top menu.

adsense performance report

To filter the view to the relevant ad units,  select “Edit selections” and “Specific ad unit” in the top of the page, and select the units that was part of the test (this is where the naming convention helps to identify the right ad units….)

google adsense ab test

The result of this test is that a “plain” ad without any border or background color performs 29% better than a ad with a grey border. That’s pretty significant…

However please notice that test results depends on ad layout versus how the website is designed, so you should start to experiment with different color setup  and ad formats to see what works best on your site.

You can see examples of the allowed modifications to the adsense code here

Happy testing :-)

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
fold-left fold-right
About the author
Jørgen Nicolaisen has been passionately interested in everything online since 1995. His experience is based on working with small hobby projects as well as high volume websites. Jørgen is currently focused on the PHP based programming framework - Codeigniter, and WordPress naturally

Comments are closed.