• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Tracking the average time spent by the user

Community Beginner ,
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

Hi everyone

I'm working on a system that will track the time spent in my application by each user, The only Idea I found is:

Log every session start time and sessionID and then update it when the session is closed. This approach won't give me an accurate results

Anyone have a better idea ?

Thanks

TOPICS
Advanced techniques

Views

645

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

I don't think that would be a very good measure at all.  The timeout value which is where the system waits a specified amount of time (twenty minutes by default) for any new requests would be a huge factor in this average.

This is not really something you can measure acurately without having control over the client.  The best you can really do is record each request made by a given user.  Presume that the time spent on the site is the amount of time spent between the first request and the last request.

You will want to do your best to filter out robots which allmost always make every request as an unique user, because they do not pass back the cfid and cftoken cookies that allow the system to know this is a returning 'user'.

You may also have to account of other users who block or do not allow cookies, and users who only make a single request of your site and move on.

All of this depends greatly on what type of site we are talking about and what type of users are you traking.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

You could start out trying Google Analytics, it's free and you just drop a tag in your site. I've used it and although I like to code things myself, this was a quick fix to get the "Avg time on site" data.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 18, 2009 Nov 18, 2009

Copy link to clipboard

Copied

Hi..

I think may be you can find the close proximity of average time spent by having the record of total time spent.

http://www.labortimetracker.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 19, 2009 Nov 19, 2009

Copy link to clipboard

Copied

You will get the most accurate tracking system if your users have to log in.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

LATEST

A realistic approach would be to send the 'time this page was generated' as a hidden-field in the forms.  When the data comes back, examine the

value and, if it is reasonable, use it to calculate your elapsed-time.

For an inward-facing (intranet) application, this strategy is pretty reasonable and robust.  It's not the only way (you could use Session variables, for instance), but it ought to work pretty well.  It certainly has the compelling advantage of being quite easy to do . . .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation