As a Google AdSense publisher I’ve noticed the occasional click which pays $0.00. These may turn out to be accidental clicks from your browsing your own site, or sometimes clicks Google has reason to believe are fraudulent. I can’t coerce my readers into clicking ads or not clicking ads, but I figured I could find a way to prevent myself from accidentally clicking on the ads.
I wanted to try out Greasemonkey, the Firefox extension which lets you use JavaScript to customize your browsing experience. So I wrote a Greasemonkey script which prevents accidental clicking on your own Google AdSense ads.
The script currently requires Firefox and Greasemonkey version 0.5 or later. Previous versions of Greasemonkey are not tested and not supported.
After you have installed Greasemonkey, download the script adsensepreventaccidental.user.js and install it. The first time you see a Google AdSense ad unit, it will ask you to enter your AdSense publisher ID, the pub-**************** number from your AdSense code. This is needed so that the script knows which ads to prevent clicks from.
To test the script, try clicking on the “Ads by Goooooogle” link in your ad units, which should also be blocked.
This script is released under the terms of the GNU General Public License.
Bad Behavior has blocked 2527 access attempts in the last 7 days.