Testing your Ads with A/B

August 4, 2006

Filed under: Google — Rxbbx @ 10:01 am

Google AdSense A/B

If you’re wondering which ad performs the best: The ABCs of A/B Testing. It is just a piece of Javascript which rotates two ad units. Modifying your ad code is against AdSense program policies but now they give publishers permission to modify the code for use with this specific script for the purposes of A/B Testing.


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

Related Links:
- The ABCs of A/B Testing

No Comments »

Permanent Link

No comments yet.

Leave a comment