How to Split Test (A/B Test) Your AdSense Ads

Posted By Darren Rowse 16th of May 2008 Adsense

A couple of days ago I talked readers through some different approaches to AdSense Ad Design and how it can make a significant impact upon the earnings of your AdSense ads. At the end of the post I mentioned that one great way to work out which ad design is best for your blog is to run a split testing campaign.

Today I want to talk readers through how to do this – it’s not as complicated as you might think!

What is Split Testing?

Also sometimes called A/B testing, split testing means that you run two different versions of an AdSense ad unit on your blog so that you can see which one performs best. You serve one version of the ad to one visitor, and then another version to the next visitor.

If you do this over a large number of visitors you’ll get a bit enough sample to be able to draw some conclusions about which ad design works best in that particular ad position.

How to Run a Split Test on Your AdSense Ads

Split testing sounds complicated but it is relatively simple to set up. In short, all it really involves is setting up a couple of channels within your AdSense account so that you can track the results and then inserting a little extra code around the AdSense code in your blog’s templates. Here’s how:

1. set up two different custom channels in your AdSense account. They might be called something like ‘test A’ and ‘test B’.

2. generate two different ad units in the back end of your AdSense account. Make them identical sized formats but give them two different color palettes. Copy the codes AdSense gives you and put them into a text document – you’ll need them in a minute.

3. take the following code insert the two ad units codes that you just generated into it were it indicates:

<script type=”text/javascript”>
    var random_number = Math.random();
    if (random_number < .5){
        //your first ad unit code goes here
    } else {
        //your second ad unit code goes here
    }
</script>
<script type=”text/javascript”     src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”></script>

ie – you need to replace the bolded lines with your two different AdSense codes.

4. Insert everything into your blog’s template in the appropriate spot for the ad to make it position where you want it to show.

With the above code you should now see the two different color palettes rotating on your blog. It will show one 50% of the time and the other the other 50% of impressions.

You can then log into your AdSense reports area after the script has been rotating for a while to see which one is performing best. Give it a day or two to run before you make too many changes as it can take a little while to get the ad having shown enough times to draw any solid conclusions.

Variations on the Test

You can do the same split test to work out what Ad Unit Size is converting best. The process is identical but instead of having your two ad units with different colors make the only variation their sizes (ie keep the colors the same).

You could also test any other element that you have control over. For example the different corner options, image ads vs text ads etc.

Lastly – you don’t have to make the split test a 50/50 one. You could specify for one ad unit to show up 95% of the time and the other only 5%. This means only a small number of your readers see the new ad unit (good if you’re testing something bold). To do this simply vary the “.5” to another number. For example .9 would show one ad 90% of the time.

Final Tips

  • Backup your templates before experimenting. If you mess it up somehow you can then quickly revert to your original setup.
  • Make one of the ads you rotate one that you’ve been testing for a while so as to give a good baseline result to compare to.
  • Don’t experiment with multiple changes at once. For example if you test ad size and colors at once you won’t be able to identify the specific element that cases the changes in ad performance.
  • Once you’ve worked out which of your two ad units performs best keep testing with other options. Take your best performing one and test that against other designs to see if you can find one to better it. Once you do use that one as your baseline!
Exit mobile version