I am using asp.net 2.0. I have 5 web pages in my project. I want to calculate the length of time for which visitor view the page.
A:
Outline for a tracking system:
- Server-side: When the visitor requests the page, generate a unique id and include it in the page. Save the unique id with the user, page, and any other information you wish to track.
- Client-side using javascript: When window.onunload fires, send an ajax call to the server to say the user has finished with the page identified by the unique id. Looking up the id saved in step 1, update the length of time visited.
Alternatively, use something like Google Analytics, which does a stellar job of tracking visitors.
Will
2010-10-08 06:35:29
what actually is Google Analytics
2010-10-08 06:37:07
Read here: http://www.google.com/analytics/ . It's very easy to set up, and tracks many, many things about the visiting users, including what features of a page they click on most! Neat stuff, and worth checking out. Heh, Google for it, and billions of examples around the net. ps. It's free!
Will
2010-10-08 06:38:44
but i am using localhost it is not showing my profile any ideas for local host
2010-10-08 06:43:59
When using localhost you can't have visitors from outside that machine anyway. When you give your site/machine a DNS/domain name that is accessible by others, then the likes of Google Analytics can use it, even if inside a LAN.
Will
2010-10-08 06:49:00