javadi82
04-14-2003, 01:56 PM
Question:Is it possible to record the duration of time(like minutes) a user has spent on my site?
i want to record the time users spend on my site and store it in a database. So that if users leave quickly, i know my site ain't worth their time and i have to do some serious updating to do.
i know how to store stuff onto a database(using mysql) but i want to know how can i know the duration ?
my idea was to do the following:
1.when a user clicks on the "ENTER SITE" i would start a timer.
2.when the user clicks the close button of the IE window . i have to stop the timer and store it in a database.
while the first step is a bit easy to do, i want to know how i could start the timer. more importantly, the second step i guess should be done using JAVASCRIPT.
please reply if:
1.you have already done something like this.
2.you can help me out with this idea(i am a bit of novice in javascript)
3.more importantly, if you have a better way in which one can do this kind of thing.
thanks.
i want to record the time users spend on my site and store it in a database. So that if users leave quickly, i know my site ain't worth their time and i have to do some serious updating to do.
i know how to store stuff onto a database(using mysql) but i want to know how can i know the duration ?
my idea was to do the following:
1.when a user clicks on the "ENTER SITE" i would start a timer.
2.when the user clicks the close button of the IE window . i have to stop the timer and store it in a database.
while the first step is a bit easy to do, i want to know how i could start the timer. more importantly, the second step i guess should be done using JAVASCRIPT.
please reply if:
1.you have already done something like this.
2.you can help me out with this idea(i am a bit of novice in javascript)
3.more importantly, if you have a better way in which one can do this kind of thing.
thanks.