If you use Google AdSense, you will know that it is forbidden to click on your own ads. Unfortunately there is always a risk that you accidentally click on them, and the risk isn't limited to you clicking, anyone using the same IP number as you (such as your family members or office co-workers) could be clicking on them, especially as they may not be as careful as you are (or they may not even be aware of it). Google has no way of knowing who is doing the clicking and will assume that any click from your IP number is probably from you and decide to ban you from AdSense.
To prevent such a scenario I had for a long time been using a Greasemonkey userscript called "AdSense Prevent Accidental Clicks" that blocked clicks on your own AdSense ads. I installed this for every user on every computer in our house.
This worked well until Google bought Doubleclick and migrated AdSense
to another server on
doubleclick.net. This change
unfortunately caused the userscript to stop working.
It may seem like a trivial change to update the URL of the AdSense
server in the userscript and get the script to work again,
but there were some other usability issues with the userscript
which had always bugged me:
You had to enter your AdSense ID manually, and if you
accidentally did it wrong (or entered a blank number by canceling)
it was difficult to correct your mistake.
Another issue was that your clicks were completely blocked, while
sometimes one does actually want to visit the advertised site
(but then without causing an actual AdSense click).
Prompted by the fact that the script was no longer working and
given these issues I decided to write a completely new userscript,
which you can find below.
The AdSense Click Protection script has the following characteristics:
There are three ways to verify that the script is working:
The AdSense Click Protection script blocks click events within Google's AdSense code and replaces it with a clean redirect to the advertiser's URL. This should (we hope) make it safe to click on those links. As a result the other parts of the ad block are not clickable at all.
If you have accidentally set up protection for the wrong AdSense ID, right-click on an AdSense adblock and choose> . Then go to the Greasemonkey menu by right-clicking on the Greasemonkey icon in the status bar. Under you will see two options: and . will protect the AdSense ID associated with the current AdSense ad block.
The prohibition to click on your own ads has probably prevented a lot of people from clicking on interesting ads they saw on their own site (I know it has for me). The AdSense Click Protection userscript could therefor make a whole demographic of active webmasters available for these ads. This may turn out to be an advantage for AdWord advertisers on AdSense, as it may actually increase the number of click throughs on their ads without costing them anything extra.
I can't stress this enough, I can practically predict that some people are going to accidentally get banned from AdSense by failing to use this userscript properly! So please, please, please be careful. Remember Greasemonkey must be turned on (it's easy to turn off and forget), you must have entered the correct AdSense ID to protect your ads. Try hovering over an ad before clicking on it to see if it looks ok. If you don't see the ad links with a green background and dark green dotted border then something is surely wrong. Also realize that Google could use other techniques to intercept clicks on Ads, making your clicks count even when stripped of their AdSense referral encoding. The script tries to intercept these clicks itself, but you never know. There is also the risk that the server serving AdSense ads will change again in the future causing this userscript to no longer work. If you are unaware of such a change you may end up clicking on your own ads in the false belief that this userscript is protecting you. Also in this case if you do not see the green background and dark green dotted border around the ad titles you should know something is wrong. Besides these risks there are probably more risks that neither you nor I are aware of.
So remember, by using this script and blindly trusting it to work you might be placing your AdSense account at risk. It's a risk that you choose to take. If you don't want to take this risk, just don't use it or don't click on your ads anyway (and use this script only as a layer of protection against accidental clicks).