Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Need a tracking PHP Script – “how long people stay on the website?” (http://www.go4expert.com/forums/tracking-php-script-long-people-stay-t29064/)

AimyThomas 10Sep2012 09:10

Need a tracking PHP Script – “how long people stay on the website?”
 
I want to know, is there a way to track how long anyone has been logged into website and then insert it up for each time they have logged on.

In case, user a logs in for 30 minutes, then later comes back and logs in for an hour, then later comes back and logs in for 50 minutes,

Add it up equal 2 hours 20 minutes. Is this possible?

Thanks

shabbir 10Sep2012 10:06

Re: Need a tracking PHP Script – “how long people stay on the website?”
 
Yes very much possible.

What you can do is there should be start timer when user is logged in and and in each page load or anything that timer makes an entry like end timer and the final entry would mean amount of time he was online.

shabbir 10Sep2012 10:06

Re: Need a tracking PHP Script – “how long people stay on the website?”
 
Moved to PHP forum

ManzZup 15Sep2012 16:57

Re: Need a tracking PHP Script – “how long people stay on the website?”
 
use cookies for that
simply update the cookie stored in user's browser each time he comes to the site
only problem will be the deleting of the cookies by the user
but for random statictics this method is used


All times are GMT +5.5. The time now is 07:28.