Thursday, October 12, 2006
When building a new site, it's quite common to make a few tweaks, save and upload the page, and load it into your browser to see what your changes look like 'live'. This process can be repeated many times.
Google AdSense rules (also referred to as TOS - terms of service) say that you can only put AdSense code onto pages that are launched and functioning. In other words, not on test pages or those with 'under construction' on them. In addition to making repeat requests from the AdSense server, you also run the risk of accidentally clicking on the ads.
However, it's useful to see the AdSense code to keep track of the overall picture. So what can you do?
Easy - make two simple changes to the AdSense code whilst you're finishing the page and then reverse the changes once the page is live. The second line of AdSense code normally looks like:
google_ad_client = "pub-your 16 digit id here";
But change it to:
google_adtest = "on";
google_ad_client = "ca-test";
//google_ad_client = "pub-your 16 digit id here";
Once you're done, just change it back to the original - simple!
Labels: adsense, programming