How to Easily Split Test Adsense Block Palettes
by jim on December 22nd, 2009Everywhere you turn, whether it’s on the internet or in real life, there’s something known as “conventional wisdom.” Conventional wisdom can be a boon in real life but it can lead to mistakes online. This is because in the real world, there are very few unique situations where conventional wisdom fails. There are fewer variables, so the “don’t swim thirty minutes after eating” bit of advice is probably smart for anyone (unless you love cramps).
When it comes to the internet, there are so many different variables and factors that conventional wisdom is useless. Fortunately, you can test anything yourself, at almost no cost, and find the answer for yourself.
Google Adsense is one of the most popular and easiest ways to monetize your website. If you’re just starting out, I wouldn’t focus too much time on this because you should focus on producing more content. If you get to the point where you’re seeing a few thousand visitors a day, it’ll be worth spending a few minutes a week testing layouts and color palettes to maximize earnings.
So how do you test palettes? (this is the colors and fonts of the adsense block, not where they are placed)
Simple – use PHP’s rand() function to generate a random number (0 or 1) and then display an ad block. Presumably it’ll display each block 50% of the time. When you design the ad blocks, be sure to add channel tracking so you can look in the reports to see the performance of each.
<?php $test = rand(0, 1); if ($test) { ?> // First adsense block <?php } else { ?> // Second adsense block <?php } ?>
If you want to test more than 2, you can just change the rand function to 0,2 (for three options) and add more if blocks. 0,3 for four options, etc.
Be sure to give it enough impressions to show a significant difference. That’s why I recommended doing this when you have a few thousand visitors a day (since you’re splitting them between the two blocks). If you have a typical CTR of 2%, that’s only 20 clicks on 1,000 impressions. Let it run a few days and then come back to see the results, you want a few thousand in each and a significant difference (that’s up to you to decide) to make a decision.
Also, play with a bunch of different palettes. The current Adsense palette on Bargaineering was the optimal palette out of about a dozen that I tested (including some ridiculously ugly ones just to see if the discord led to more clicks… it didn’t). Don’t test too many at once (my max was three at a time, changing very little about the colors) because you’ll just have to wait longer to find a result.
Test test test!
Like this article? Get all the latest articles sent to your email for free every day. Just click "Subscribe" and enter your email. Your email will only be used for this daily subscription and you can unsubscribe anytime.

December 22nd, 2009 at 3:24 pm
I use this all the time… not only for AB testing (or AB/AC/BC testing) but for splitting impressions between ads.
December 22nd, 2009 at 5:19 pm
Don’t you have your own ad server?
December 23rd, 2009 at 5:04 pm
[...] use this to split test Adsense because Adsense won’t let you track clicks in this way. To split test Adsense, using a simple rand() function and an if clause is [...]
December 29th, 2009 at 10:41 am
Thanks for the tip! I am working on this now with good result.
December 29th, 2009 at 11:23 am
If you have some good data you want to share, I’m sure everyone would love to see it. Some changes you’ve tried that have worked and ones that haven’t… it’s always good to have new ideas whenever you’re testing.
January 7th, 2010 at 4:15 pm
I’m using this right now to test a few different ad color schemes in my left sidebar. I’ll be trying 2 at a time for long enough to get some good numbers. Thanks for the tip!
January 12th, 2010 at 10:11 am
[...] Different ad colors and and text sizes will work better for different sites. Because of that you should set up split testing of your adsense ads to find out what colors, font sizes and ad sizes are most effective for your site. To find out a simple way to do this check out this tutorial on split testing adsense ads. [...]