mmosel Posted August 2, 2006 Share Posted August 2, 2006 What is your method for tracking guests and returning guests?I'm working on a system where I will set a unique cookie for each guest (or try to). I'm trying to decide if generating a random string is sufficient or if I should use an auto-increment value. If I use the random string, there there is the ever so slight possibility of a duplicate. If I use an auto-increment, then I'm going to have so many non-used numbers it's not even funny (because every time there's a new hit to the home page I would attempt to insert a cookie, which would be an auto increment value).So, how do you or how would you handle this? Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/ Share on other sites More sharing options...
BillyBoB Posted August 2, 2006 Share Posted August 2, 2006 http://www.phpfreaks.com/tutorials/62/0.phpthat starts but there are tutorials on http://www.phpfreaks.com/tutorials.php Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/#findComment-67619 Share on other sites More sharing options...
mmosel Posted August 2, 2006 Author Share Posted August 2, 2006 Thanks, but that's a tutorial for who's online. I am building a deeper tracking system that will track return visitors - and using the IP address is not smart for this. Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/#findComment-67655 Share on other sites More sharing options...
BillyBoB Posted August 2, 2006 Share Posted August 2, 2006 in the tutorials is a way to do the unique thing too Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/#findComment-67657 Share on other sites More sharing options...
king arthur Posted August 2, 2006 Share Posted August 2, 2006 I store the timestamp of the exact time they first visited along with a random number, this pretty much guarantees a unique number. Beware that some people do not accept cookies and then you need to look at other things to identify them such as IP address, user agent, etc. Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/#findComment-67675 Share on other sites More sharing options...
mmosel Posted August 2, 2006 Author Share Posted August 2, 2006 Yeah, thanks for that mr. King. :) I was going to go for the random number, but I decided on auto-increment. I already have a full page_logs table, with ip, user_agent, referer, page, etc. But I want to track repeat visits by guests, and then members who aren't logged in, and then of course while they are logged in. I record raw data, and then run a cron job to filter out bots in the auto-increment table. I'm still working out how I'll process some of the data, but that's another story. Quote Link to comment https://forums.phpfreaks.com/topic/16275-how-do-you-handle-guest-tracking/#findComment-67712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.