Tuesday, January 28, 2014

Killing the Vampirestats & Adsensewatchdog

A while back, I blogged about the pond-scum who were big "readers" of this blog. They've been eclipsed by the increased readership, but a colleague pointed me to an excellent blogging website that showed how to eliminate the problem altogether.

All you need to do is put the pond-scum into a little javascript script that redirects them elsewhere, and they need never pollute your statistics again. After adding in this little script, just below the <head> of your template html:

<script type='text/javascript'> 
     var block = [&#39;http://www.vampirestat.com&#39;, 
        &#39;http://www.adsensewatchdog.com&#39; ];
      for (var b = block.length; b--;) 
        if (document.referrer.match(block[b]))
          window.location = &quot;http://google.com/&quot;;
I got no hits this entire week! And, the monthly and all-time stats are also frozen at the level they were at when I added the script. So, eventually, they will clear out.

Anyone starting a blog should add this in right away. And to read more details about it go to the site where I learned the trick.

I Remain,


No comments:

Post a Comment