Practical Analytics: Average Visit Duration

December 5th, 2008 by amoore

Average Visit Duration is found in the Visit Summary table of the Overview Dashboard.

A few months ago there was an analytics community-wide discussion, some might say an epiphany,  regarding average visit duration (also called average visit length or, sometimes, average time on site, depending on the source) as a relevant measurement for understanding engagement. Certainly, visit duration seemed far more relevant than plain ole’ visits or views. As a result, a lot of people asked (and still are asking), “So how do you determine average visit duration?”

This begs the question, “What is visit duration, anyway?” The WAA definition is:

“The length of time in a session. Calculation is typically the time stamp of the last activity in the session minus the time stamp of the first activity of the session.”

Average Visit Duration is different from Average Time Viewed, although the two are related. Average Time Viewed is specific to a particular page or object that was viewed during the visit — we’ll cover that in a future blog post. For now, back to the original question.

How does WebTrends calculate Average Visit Duration?

The first thing to understand is that our Average Visit Duration metric–which appears in the Visit Summary table of the Overview Dashboard–is calculated based on the time between the first hit and the last hit of the visit. The time between these two points is the Visit Duration and all non-zero Visit Durations are averaged to produce the metric in our Visit Summary table. Average Visit Duration is not dependent on the number of hits or page views, rather it is dependent on the time between hits.

Naturally, if a user only visits a single page, it may not be possible to determine the length of time the visitor spent on the site. Something has to occur to fire off the Java Script or to initiate another request from the web server (if you are using log files) and that’s usually a click to go to another page. WebTrends treats these as a zero-length visit and removes them from the calculation of Average Visit Duration. The rationale behind this is that, since we don’t know the exact duration of these single-page visits, it would be better to remove them entirely from the metric, than to guess and add additional uncertainty.

We’ll talk about what happens with these zero-length visits–the ones whose duration we don’t know–in a moment. But, first, an example.

AN EXAMPLE:

We have three visits to our website today:

Visit 1: This visit consists of 5 hits (server calls, in the new parlance) with 55 Minutes between the first and last.

Visit 2: This visit consists of just two server calls and only 30 seconds elapses between the first and last server calls.

Visit 3: This visit is a single-page visit. Since we don’t know how long the visitor kept our page open before leaving, the visit is treated as having zero length (0 seconds).

The Visit Summary table would show this:

  • Visits: 3 – Even though one of the visits was treated as zero length, it was still a visit. It shows up in the overall visit count and is also added to the visits recorded in the Single-Page Visits report.
  • Average Visit Duration: 00:27:45  – This is calculated as an average of all non-zero-length visits. In this example, this is 55.5 minutes divided by 2, yielding 27 minutes, 45 seconds.
  • Median Visit Duration: 00:00:30 – Median is the mid-point in all the values used to calculate the metric and is different from the mean. In our example, the figures we have to work with are 55 minutes, 30 seconds, and 0 seconds. The number that is midway in our list of figures is 30 seconds. Note that the zero-length visit is included in this calculation. (For more information on the use and definition of Median, check out Wikipedia’s definition.)

Keep in mind that, in general, average visit duration–whichever alias you use–is calculated in a similar way by many web analytics tool. Some of the details will vary, of course, but the products out there are dealing with similar limitations–and that’s as much due to web technology, as to the products themselves. What’s important is what’s relevant for you to measure based on your organizations goals, strategy and business model. And that’s a question that is best answered by you, rather than by any industry pundits.


Thanks to Dashiell Lavine and the other participants in the WebTrends Q-List for contributing to the knowledge shared in this blog post.

Tags: , ,

8 Responses to “Practical Analytics: Average Visit Duration”

  1. Jacques Warren Says:

    Nice post. This is the first time I have ever seen a clear explanation of the integration of 0 length visits in the median calculation et not in the average duration one (nowhere in WT documentation). I knew the fact, but could not get tech suport to confirm it.

    This makes the average and median barely comparable here (usually, the median should shed light onto the average), especially with sites with high bounce rates. I wonder if WebTrends should attribute a minimum of, say, 5 seconds to 0 length visits and include them in the average calculation, or something like that.

  2. Chris Says:

    I agree, Jacques. I’d like to have the following:

    User is allowed to specify an assumption about the length of time on the first page and the last page of the visit.

    Median and average are available twice – WITH the single page visits included, and WITHOUT.

    In other words, get both mean and median for all visits, and again for only those visits where people stayed for at least one more page view.

  3. Thomas Bosilevac Says:

    April, thanks for the excellent explanation of the WebTrends standards. Single-Page Visits bring to light the importance of starting to review the advantages of offsite click reporting. Some sites (blogs, knowledge articles, etc.) may link off the domain, thus, a single-page visit is not a bad thing – as long as they are clicking through to the intended action. Where regular tagging treats this as a “Bounce”, offsite clicks enable us to prove the value more precisely.

    As you mention in this blog, this is not something to jump into: requirements, a measurement stratgy and event model must be identified first.

  4. Michele Warther Says:

    @Jacques – We’re updating our Knowledge Base to include this as well as future documentation. Appreciate you letting us know. Cheers – Michele

  5. Joe Kamenar Says:

    If using SDC tags, is there a way to use javascript with some sort of unload function to make a call to the server to register when a visitor leaves the home page? If the visitor leaves the home page via a link on the site, going to another page on the site, how would this forced “unload” call impact the overall time on page or site metrics?

    Thanks for taking a look at this.

    - Joe

  6. April Moore Says:

    Hi, Joe. If you send the unload function as a non-page file type, (not considered an actual page in the profile), the unload function itself would not show up as a page view, but the hit would be included in the Average Visit Duration and it would also count against your server call licensing (so keep that in mind when rolling something like this out; you probably wouldn’t want to do this on every page). The numerator for Average Time Viewed calculations would be adjusted by the inclusion of the time it took for the hit itself, but the page view portion of those calculations would not be changed (Average Time Viewed is, however, going to be covered in a future blog post). So it might not get you much.

    However, a similar method that I’ve heard about for reporting better quality “duration” data for home pages is to build a script that would create a time stamp when the page loads and then subtract the difference on page unload. You can even build in some logic that would only send data if a visit to the page lasted more than (for example) 10 seconds – for example if you were trying to eliminate visits where the user was not actually reading the home page and was just using it to pass through to more interesting content. You can pass the resulting time stamp value as a query parameter in seconds and then report on it in a “Home page duration” custom report. This would not capture all visits, but the data you do capture would likely be more realistic in terms of how users actually interact with your home page.

    This still wouldn’t give you anything for those visits where the user simply walked away from their computer, but it would at least give you a piece of the puzzle. Note that the usual caveats of “impacts on server call licensing” and “always test first,” still apply, too.

    Good question. Thanks.

  7. Tera Says:

    Probably a basic question but how do you deal with tab browsing? Sometimes I keep dozens of pages opened but I’m not actually reading them…
    Thanks!

  8. April Moore Says:

    Tabbed browsing should not have an impact on the length of the visit, any more than it would any time you simply let the visit expire rather than actively leaving the site. If you end your visit with a tab open and then come back, the page that was open on the tab will show up as the referrer of the new visit. But if you are using a strong sessionization method – cookies being the norm – then all of those various tabs will still show up as part of the same visit session. The last page visited (or tab opened) shows up as a visit of zero-length because WebTrends will automatically end the session after 30 minutes of inactivity and, furthermore, since WebTrends doesn’t know how long you were actually viewing that page, that last page will not be counted in the average visit duration (there was no closing hit before the session ended).

    Now, they can wreak havoc with path analysis. But they should not really have an impact on session length.

Leave a Reply