Click counter to ignore traffic from search bots

Posted on 16th Feb 2014 by admin

I have a click counter on my site that...well, counts the number of clicks a link gets on the frontpage. It's a good system, but it's got a few flaws, an example being that it counts "clicks" from search engines and crawlers. Since the most common of these is Google, I'd like to start by ignoring clicks from Googlebot. I still want to redirect the bot like normal, I just don't want to count it's access of the click counter URL. How could I go about doing that? I'm having a hard time figuring out what Useragent or IP range Google uses.

Other forums