[ Google-related ]
myIP() Cross Your Fingers Click Happens Google Gadgets SE Spam Google Data Centers

Click Happens

Don't let invalid clicks get you banned from Google AdSenseTM

Click Happens. You've decided you're in it for the long haul and want to play it straight. No clicking on your own ads --- but even that can be tricky. What can you do besides carefully tip-toe around your own sites? Here are some useful ideas:

  1. Configure your browser for ad-blocking This is easy to do in Firefox with the AdBlock extension. Set it to 'Remove' the output from pagead2.googlesyndication.com

  2. Disable JavaScript in your browser. This is one of the easiest and surest ways to avoid accidentally clicking one of your own ads. It is especially effective during those late night editing sessions that include grinding away at the steady cycle of edit, update, refresh, repeat while trying to get a site exactly right. (see How to Disable Active Content in Internet Explorer, or Firefox Options)

  3. Replace ads with place holders during the development cycle. A simple image makes an adequate stand-in for a 728 x 90 Banner

    <img src="/images/blank.gif" width=728 height=90 border=1>
  4. Put `google_adtest` in your scripts. This way you can still see how your site is going to look in production and begin to get an idea of the kinds of ads that will be displayed. This requires two changes to the AdSense for Content script. Insert the following line of code in the script preamble:


    Now your safe... just don't forget to put it back when you're finished testing!

      We have not been able to find any documentation for google_adtest on Google's site, however, the variable name is found in the AdSense for Content source file and a number of people have reported being advised to do so by Google.

  5. Edit the local hosts file to block access to googlesyndication.com from the computers you control. This works especially well if there are any young 'helping hands' around the house.

  6. Use the myIP javascript to implement `google_adtest' . This requires some knowledge of JavaScript: [This method is currently being used on this page]

    if( myIP() ) google_adtest='on'; google_ad_client = "pub-0000000000000000"; google_ad_width = 468; ...
  7. Use PHP to implement `google_adtest' when your IP address is requesting the page. This requires some knowledge of PHP:

    <script type="text/javascript"><!--
    if( $_SERVER["REMOTE_ADDR"]=="") {
      echo "google_adtest='on';\n";
    google_ad_client = "pub-0000000000000000";
    // etc...
  8. If you do click one of your own ads, the best practice is to notify Google at adsense-support@google.com right away. Chances are good that you will receive a friendly response with a link to the AdSense Preview Tool (which unfortunately only works with Internet Explorer) and a reminder "that clicking on your own ads for any reason is prohibited, as it has the potential to inflate advertiser costs."

Google Pack contains 13 of the world's best programs. Install just one of them or all of them for free

DISCLAIMER: The information on this site is provided as is. The author(s) make no claim as to its correctness or fitness for any purpose. This website is not affiliated with or approved by Google. In fact every time they see it, Larry Page and Sergey Brin just shake their heads in kind of a sad way and wonder what this world is coming to.

© 2019 Michael Thompson