
Google's adsense blog discussed one excellent way to do A/B testing. Using a simple javascript.
<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>
You need to create 2 sets of adsense code with different custom channel. Just dump the adsense code on the specified location above and you're good to go.
Read about the whole post here.






Comment Preview