A/B Testing Ads

Quickly and effectively test two different AdSense ads at the same time to see which one generates the most revenue, as opposed to testing one at a time

A/B testing ads is when two different AdSense units are placed in the same spot on a webpage. Each time a user visits the website, one of the two ads is randomly shown. With the run of time, combined with a decent amount of traffic, you can get a sense of how each ad performs in that spot...

A/B testing ads takes the guessing out of choosing just the right AdSense format to make more money.

The template for A/B testing is some simple javascript code:

<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>

Normally, messing with AdSense code is a BIG no. But luckily, this specific bit of code is sponsored by Google themselves.

So for example, say this is the usual code you have for a single AdSense unit:

<script type="text/javascript"><!--
google_ad_client = "pub-**************";
/* Channel Name*/
google_ad_slot = "123445";
google_ad_width = 111;
google_ad_height = 1223;
//-->

</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

The part highlighted in red is the part that you would replace in //your first/second ad unit code goes here

Now let's talk speculation. If you remember the alternating colors tip, making AdSense units change is a good way to avoid ad-blindness and increase CTR. Thus, in theory, alternating ads could have a similar effect...

Back to More AdSense Stuff

Disclamer | Privacy Policy