3

Possible Duplicate:
How to measure a time spent on a page?

I am trying to get the time spent on some of the pages in my site. One way I am thinking to implement is polling the server with ajax request every 10 sec , but this would mean a lot of request for the server.

Is there any better way to implement the feature ?

Thanks.

Community
  • 1
  • 1
Prabesh Shrestha
  • 2,732
  • 4
  • 29
  • 44
  • Poll it every 30 seconds, no? What average times are you expecting to have and what will you get from it? Most times it is enough to track movements between the pages on yor site. "onunload" may also work in some browsers. – Lyth Nov 17 '11 at 09:21

1 Answers1

1

Could you not just use a single AJAX request to inform the server of the page unload event?

Nev Stokes
  • 9,051
  • 5
  • 42
  • 44