Forum Moderators: open

Message Too Old, No Replies

Time on Page -- HELP!

is there anything other than onUnload?

         

sabrawv

8:04 pm on Apr 12, 2004 (gmt 0)

10+ Year Member



I trigger an onLoad and onUnload event to determine the time a user spends on a page (using functions that use date objects). Unfortunately, the onUnload is called only 80% of the time. I'm new to this, but in reading posts, I am guessing it may have to do with onUnload being disabled because of popups. Anyway, I just want to have some idea in my log, without putting up annoying popups, how long a user spends on a page. Is there anyone there who can lead me to a solution. Thanks. Like I said, I'm new at this and need all help that can be thrown my way.

DrDoc

9:49 pm on Apr 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using any form of session management?

sabrawv

10:06 pm on Apr 12, 2004 (gmt 0)

10+ Year Member



oh thank you for responding! i don't really know what session management is so i'm not sure how to answer. i can say that the user doesn't have to log in with a password or anything like that. we don't want to bother the user in any way... we just want to know how long they're staying on the page... that way we have some idea if they're reading the content. the onLoad creates a date object. then, the onUnload creates a date object and uses the two date.times to determine the time on page. the function then creates an image and uses the page name and time as an image name. this way we can (as the theory goes) look in the log to determine how long they stayed. but, sadly, the onUnload isn't always called. i read that the google toolbar can disable it. also i'm not sure if it's called if they X out of the page. any ideas? thanks for responding. i was beginning to think a 1 would stay by my plea for help.

webboy1

9:33 am on Apr 13, 2004 (gmt 0)

10+ Year Member



There probably is some way with a bit of session/ASP work that this could be done, but initially would think it could be quite complicated, and quite a bit of work.

If you need exact times for everypage, then perhaps it would be worth it. However, it might also be worth looking into some stats/log software.

There are quite a few bits of stats software that give you average times spent on site, and a few other variations.

Worth a look i would think.

Webboy