Using PHP to Determine Which Adsense Ad Works Best

Last updated: Mar 31, 2008

I recently read an article that discussed the effectiveness of different adsense ad sizes. The three medium box shaped ads that adsense offers is:

250x250 300x250 336x280

The article mentioned that even though the 336x280 was the largest it wasn’t neccesarily the best performing advertisement since most online advertisers develop their image ads to fit in a 300x250 slot. The author had even said he spoke to one advertising agency representative who says that they’ve never made a 336×280 ad for any of their mainstream advertisers.

The reason this is important is that the more advertisers fighting for a specific ad block size the higher the price of the ad, thus more money for your website.

But how do we test it? How do we know for sure that one ad block out performs the others?

I have set up a php script to randomly display ad block A and ad block B. This is also known as split testing or multivariate testing.

The Code

<?php $splitIt = rand()&1; ?>
<?php if ($splitIt == 0) { ?>
     // Adsense code for ad block A
<?php } ?>

<?php if ($splitIt == 1) { ?>
     // Adsense code for ad block B
<?php } ?>

Make sure when you setup your adsense code that you make two seperate channels so can monitor the results of the two advertisements. For more information about adsense channels check out, Introducing multiple custom channels.

Implement split testing into your site and let us know which advertisements are working best for you. I am currently testing between the 250x250 and 300x250 advertisements blocks. I plan to split test these until April 30th then I will post the results of my test.

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.

Get notified on new posts or other things I'm working on

Share: