small click tracking script
Posted: Thu Apr 17, 2008 1:44 pm
I'm trying to work on a small tracking component for something. I'm moving quite along, but I need some help in regards on how to avoid counting bots (I only want to count human visitors). Anyone have any tips? Everything I've researched has driven me to 20 or so completely different solutions and I'm not sure which way to go.
Can anyone give me some tips/advice on any of this? Should I add some sort of timing mechanism that checks to make sure the user isn't surfing at inhuman speeds? is that necessary?
- My plan right now is to filter out all known/trusted bots that I can with php's $_SERVER['HTTP_USER_AGENT']
After thats done, I plan to set a cookie that expires every 30 seconds to a minute or so.
Then I'll test for that cookie, if(!$cookie){return true;}
Then, not sure if this is possible: can I use $_SERVER(['HTTP_ACCEPT']) to verify that the user can download images?
Can anyone give me some tips/advice on any of this? Should I add some sort of timing mechanism that checks to make sure the user isn't surfing at inhuman speeds? is that necessary?