Skip to content


A/B Testing Adsense

Woah! I just picked up a very useful tip to help you A/B test your Adsense performance. Recently, I was invited by the Google Adsense team to attend some webinars for "high performing websites". The fact is, I set up a company to handle my website revenue and transferred my high performing sites to the new company, so it was no surprise that those sites started generating substantial amounts of revenue very quickly. I guess a "new" publisher generating this kind of revenue triggered some kind of alert, and the email arrived.

The webinar tutorial I've just watched has provided some useful tips on how you can test different ad setups. I thought I would share it here so that all you internet entrepreneurs may benefit from the goodness too.

Why Test Your Adsense Setup

Why is it important to test? It's the only way to optimise your revenue. You may have an Adsense setup that performs brilliantly, but how do you know you can't improve your CTR? This is where testing comes in. The following will allow you to test different ad formats to find which one performs the best.

What we are aiming to do is present to your website visitors an equal share of two different Adsense blocks. That means for every 1,000 page impressions, 500 will show Adsense block A and the other 500 will show Adsense block B. Each block might have a different colour scheme, size etc. Whatever property is in your control, you can vary between the two blocks.

There are two requirements. We need to:

  • create two different Adsense blocks with their own unique appearance - and their own channel (important!)
  • figure out a way to present each one only half the time

With a bit of javascript magic, we can achieve this with:


<script type="text/javascript">
var random = Math.random();
if (random < 0.5) {
<!-- put Adsense Block A here --> }
else
{
<!-- put Adsense Block B here --> }
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

Fantastic! This code will generate a random number between 0 and 1 and if that number is less than 0.5 it will display your first Adsense block, and if it's greater than or equal to 0.5 it will display the second. On average, each block will be displayed for the same number of page impressions i.e. 50% of the time.

After a certain amount of time has elapsed, you can then compare the performance of Adsense unit A with Adsense unit B via their channels.

You don't need me to tell you to stick with the higher performing Adsense unit!

Old School Testing

In the past, the way I'd tested different formats of Adsense was to let one run for a month, then reformat it and let the new ads run for another month. After two months I would have a good idea which one was performing better. The downside to this clumsy method is that you have to wait two months (or whatever arbitrary time period you choose) to elapse before you get your results. The beauty of the above method is that you get realtime results - i.e. you always have a "current" comparison available. And you can let that test run for as long as you want without having to swap the Adsense codes around.

I'm about to implement this on that dead site I bought in December 2009 and then renovated. The current Adsense performance on that site is better than I ever could have hoped for. But beware of complacency! Don't be satisfied with "good" performance. Strive to achieve magnificent performance by testing different Adsense formats!

Give me a month and I'll get back to you with the results.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Posted in articles.

Tagged with , .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.