Last post Feb 02, 2011 05:28 AM by KumarHarsh
Jan 29, 2011 12:38 AM|m-arab|LINK
I need to save how many times (seconds / minutes) each user spend in my site from his enterance to my site till exit it. How can I do this?
Jan 29, 2011 06:33 AM|shabirhakim1|LINK
You can see table structure from
This article is available along with source code/explaination
Jan 29, 2011 06:34 AM|Lateef045|LINK
You can achieve this in this way.
1. Create a new SessionVariable as soon as the user logs in. Save the timestamp .
2. In your global.asax page, there is a method called On Session Timout
In this method find the time span the user was logged in.
ts.TotalMinutes --> will give you the overall time spent by the user on the site.
3. In your logout button click, put the same code as in (2) to find out the time spent.
Also note that if the user does not log out and directly closes the window, then his session will timeout after the default timeout specified in web.config file.
So you can say that the time spent has an error margin of +SessionTimeOut duration
Jan 30, 2011 12:03 AM|m-arab|LINK
Thanks shabirhakim, I know its db structure, I mean server side codes to achieve the time
Thanks lateef, But I mean anonymous users that visit my site note registerde user.
Jan 30, 2011 01:00 AM|shabirhakim1|LINK
I have also provided url/link of article along with source code/explaination.click on below link and see
server side codes
Jan 30, 2011 01:52 AM|sovitmittal|LINK
With the help of google analytics you can do the same thing.
Jan 30, 2011 02:31 AM|m-arab|LINK
Yes, it seems the best way while I need to tracking my users with my own codes
Jan 30, 2011 05:39 AM|Lateef045|LINK
The only other option I can think of is Cookies.
Set a cookie for you users.
Store useful information in those cookies.
Jan 30, 2011 05:52 AM|shabirhakim1|LINK
In case you didn't know Above Techniques Then, IIS (Internet Information Server), as with most Web servers, keeps a very thorough record of every request made against it. Each time a page or an image is requested a new record is added
to the log file. We know that tracking visitors and customers on our Web sites is important, but what kind of information can we learn from them? People often talk about how many hits they get on their site; however, this isn't very instructive without some
additional information to accompany it.
Wayne Plourde that explains how to track web pages in
ASP.NET Along with source code download
NEXT OPTION IS
Then you can use session to track users like done here
Feb 02, 2011 05:28 AM|KumarHarsh|LINK
give a try to Lateef045's first post.
Also you can maintain individual page hit data
I hv no idea about google analytics.any example ?