/ Published in: PHP
Quickly test different Google AdSense ads simultaneously and start getting side-by-side results the same day. Use to identify which ads result in better revenue and higher click-thrus. More detailed explanation at http://blazonry.com/php/adtest2.php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if($random == 1) // run one format ad using your ad code (format a) { ?> <script type="text/javascript"><!-- google_ad_client = "pub-xxxxxx"; google_ad_slot = "xxxx"; google_ad_width = 336; google_ad_height = 280; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <?php } else // run other format ad (format b) { ?> <script type="text/javascript"><!-- google_ad_client = "pub-xxxx"; google_ad_slot = "xxxxx"; google_ad_width = 250; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <?php } ?>
URL: http://blazonry.com/php/adtest2.php