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.
UPDATE: In January 2009, the median visit duration calculation was adjusted so that zero-length visits would no longer be included. This change was made based on customer feedback so the Median calculation would be more closely comparable to the calculation for Average Visit Duration. Note that the new calculation also applies to your historical Webtrends data. However, if you exported data from Webtrends, the numbers you exported will not match what you now see displayed in the Webtrends UI. You may want to communicate this change to others in your organization if they have been monitoring visit duration as a key metric.
We have three visits to our website today:
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:27:45 – 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 zero-length visit is no longer included in this calculation as of March 2009, so that entry would be dropped and the Median Visit Duration would now be calculated as 27:45. That is, 55 minutes plus 30 seconds divided by 2. Because this data now only includes two visits, the median happens to equal the Average Visit Duration in this example. (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.