BREAKING NEWS
latest

728x90

header-ad

468x60

header-ad

How to Test Google AdSense Ads (and Improve Your Revenue)

Improve your revenue from Google AdSense ads by using this simple PHP code to test your ads and identify the ones that pay better. You could run one ad format for a week, then run the second format and compare results. Better yet, test formats simultaneously and start getting side-by-side results to compare the same day.

Lots of articles suggest trying out different types and formats for your ads. Then they say you will figure out the format, size and placement that gives you a better click-thru rate and increased revenue. That's all very nice. But, because of all the ways you can vary your ads (different sizes, shapes, locations on your page, link colors, text, border colors, etc.), this can be a long process. That is why I wrote this.

This site recommends Google AdSense for targeted ads This article is written specifically for Google AdSense ads. You might be able to modify it for other types of ads. Because ad providers and their code is always changing, this article is about Google AdSense only, but the general concepts might apply to other advertisers.

The Ad Testing Code

Google lets you vary many settings including colors of links, borders, text, backgrounds, plus ad sizes and shapes. Modify the default Google AdSense ad format and you are likely to increase your earnings.

In our example, we test an ad without a border against an ad with a border. This page has a white background, so “no border” means the color of the border is set to white. I wrote this code to test ads and found that ads without a border had better click-thru rates than ads with a border.

Take a quick look at the two ads formats we are evaluating in our coding example before we get too deep into the explanation. Only the border color is different. Everything else remains the same so we do not confuse and confound the test. (The channel ID assigned by AdSense changes, but that is not part of the appearance of the ad.) You could easily vary some other setting for your own purposes.


Building the Ad Testing Code

Log into your AdSense account and create 2 custom channels for your site. One channel is for each format you are going to test. (Adsense help explains how to set up custom channels.)

In the PHP code on your site, generate a random number of 0 or 1. We use this number to serve up one of two AdSense ads.

srand(time());
$random = (rand()%2);
?>

In your AdSense account, generate the AdSense code for the first channel. Our first channel has no (a white) border. Paste it in to your PHP code. Then, back in AdSense, generate the code for your second channel, selecting the appropriate custom channel and setting the border color. You will build something like the following:

To make it easy to see below, the border color we are varying is in bold text.

if($random == 1)
//test with white border (no border)
{
?>


}
else
//test blue border around ads
{
?>


}
?>

Let the ads run. In your reports you will see roughly equal numbers of each ad being served up. When you determine which format is better, try changing another setting to see what will give you even better click-thrus and revenue.

Download the code source (adtest.txt)

View page with both ads showing so you can see the differences.


Notes About Testing AdSense Ad Formats

Just like we tested two different border colors, we could have varied another setting. For example, if you want to see whether black link titles perform better than blue, set one color:
google_color_link = "003366";
and a second color:
google_color_link = "000000";

You can run a more complex test, with, say, three options for a single variable. Modify the random number generating portion of the code to generate a 0, 1 or 2. You should test only one variable at a time (holding all other variables constant). If you test too many variables, you do not know what is performing better.

When you get more comfortable with custom channels and with testing various ad formats, you can get more sophisticated with your tests and how you use my little PHP script.

AdSense’s Terms and Conditions require “not modifying the JavaScript or other programming provided to You by Google in any way.” The above ad test does not modify Google’s code. We are simply randomly serving up one of two scripts. When you look at the HTML source for each format that PHP generates, the scripts are exactly what AdSense generates. We have not modified Google JavaScript or programming in any way.
« PREV
NEXT »

No comments