Possible Duplicate:
setting up a database for tracking which users have clicked which links?
I would like to know a way that I can keep track of user come in and out of my webpage,
for example:
user come in to my website’s “some_page”, or exit my website’s “some_page”, or exit my website.
Perhaps i can set a variable in php to keep track of this?
(Know exactly which page my user is located kind of idea)
Could you provide a method or code to tackle this action?
You can pass a query string on each page or set a variable. Like for example you have a var $urlId, then you pass a value Home.php…
You can save to your DB -> $urlID or the page.
You can save to your DB -> $ip of the user – which is u can determine the unique visitors etc… you can add additional function to that.
You can save to your DB -> $count… “edit this part”. add additional function or method to automatically increment the count once the user visited again the site/page. You will know how many times he visited the page/site. You can determine if same user or not via IP.
Hope this little idea will help.