What we think

Understanding Google Analytics ‘Time on Page’ and ‘Session Duration’

In many Google Analytics reports, you’ll see metrics called ‘Time on Page’ or ‘Session Duration’. If you’re asking “What does that mean”, with any metric you can hover over the “?” beside the metric name to understand what it is.

 Time on Page: The average amount of time a user spends on the page on your website.

Google Analytics time on page

What about Time on Site? Time on Site isn’t actually called that any more – it’s called ‘Session Duration’. Going forward, I’ll refer to it as Session Duration, although these names are interchangeable.

Session Duration: How long a user spent on your site in total.

Google Analytics average session duration

How does Google Analytics measure Time on Page and Session Duration?

Time on Page and Session Duration tend to cause confusion regarding the specifics of how they’re calculated. Some common queries I see are:

  • Does time on page count everyone who viewed a page?
  • What about if the window isn’t active in someone’s browser but they have it open in another tab?

By standard, Google Analytics operates using time-stamps to record when pages were loaded. It records the time every page was opened or an event was triggered (more on events further down). A page load or an event trigger is known as a ‘hit’. Google Analytics applies a time-stamp whenever a hit occurs.

Google Analytics measures periods of time by looking at the difference between the time of the first hit and the time of the last hit. Here is an example session below:

How Google Analytics measures periods of time

The amount of time spent on the first page (Time on Page) is Time at hit 2 (10:05) – Time at hit 1 (10:00), which is 5 minutes.

The amount of time spent on the total site (Session Duration) is Time at last session hit (10:10) – Time at first session hit (10:00), which is 10 minutes total.

What is the problem with using time stamps?

In the above example, 10:10 was when the third page loaded. It is not the time when they left the website. They could have spent an additional 5 minutes on page 3, and Google Analytics has no idea because no further hits were fired.

If someone only loaded one page and triggered no events (i.e. they bounced off the site) their session duration is reported as 0, even if they spent time on the site.

Average session duration reported as 0

This means that, by default, Google Analytics’ Time on Page and Session Duration metrics are lower than the true value of how long someone spent on a page or site.

Is there a problem if I’ve reported on Time on Page or Session Duration and it’s actually lower?

Kinda, sorta, maybe? Don’t panic though. If your client or boss wants to argue over Time on Page or Session Duration figures, it may be good to educate them and explain that Google serves these figures.

Often, we don’t need to know the exact numbers for reporting metrics. What’s more important is:

  • No one metric tells a story: This is why you should use sessions, conversion, bounce rate, time on page/site, search engine rankings, cost per client, Google trends, social listening, crawl errors, and other context to help narrate performance and come up with further strategy
  • Analyse trends: If, in general, average session duration is going up, that means “in general” people are more engaged with the content. If Blog post A has more time on page than Blog posts B and C (+ other factors), maybe we should create more content like A and less like B and C.

If Time on Page and Session Duration are so critical to a client’s business that it being off angers them, they probably already know how it’s measured or have a workaround in place. If you’re that client and are here looking for a workaround/some other ideas, read below.

What else can we do about reporting Time on Page being reported better?

If you are unwilling to accept things for what they appear to be in Google Analytics, you might want to know what else you can do.

A good way to improve time on page and session duration (this also changes how bounce rate is calculated) is to put event tracking plan in place to measure interaction with a page such as:

  • Did the user scroll
  • Did they click a button
  • An event that fires every 30s to see if user is still on page
  • Create a custom metric that better measures time

What about people who website park?

Have you ever opened a website and just left it sitting open in the background when you get on with other things and look at other websites?

This phenomenon is called website parking. So what does Google Analytics think of people who do this? Surely they don’t count as having really opened the page, right?

Well, it depends on how the Google Analytics code is triggered. Is it coded directly into the page? Is it through a tag manager? Specifically, how long does it take for the website to send information to Google Analytics?

Typically, as soon as the javascript containing the Google Analytics code loads, information is sent to Google Analytics. Usually the JavaScript loads in the browser, even if it’s opened in another tab. JavaScript activation depends on the Google Analytics set-up as well as the browser.

Here’s an example of me parking on the Branded3 site and the real time traffic:

Google Analytics traffic source test

You can see that I have Branded3 open in another tab, I’m not actively browsing (take my word for it that I had JUST opened the site). You can see that there’s some traffic that’s come in as “test”, so I know it was me and not a random user.

You can test it yourself by going to the real-time reports of Google Analytics (make sure you do this in a raw data profile so that your IP isn’t blocked). Add “?utm_source=test&utm_medium=test” to the end of the URL you want to check. Open it and immediately move to your Google Analytics tab.

edit.co.uk/?utm_source=test&utm_medium=test

In the real-time report, go to “traffic sources” to see if “test/test” has come in.

Events, Time on Page and Session Duration

Earlier, I said “Google Analytics records the time every page was opened or an event was triggered”. This is only applicable to certain kinds of events. For example, pressing play on a video or clicking a button would count because the user actually did something (interacted with the site). These types of events are known as “interaction events”. Events such as “they were served an A/B test variation” don’t count because that’s just information about the version of the website they saw, not something they actually actioned. These sort of events are known as non-interaction events. Only interaction events count towards calculation time on page and session duration.

More Resources on Time on Page and Session Duration

Real Time on Page in Google Analytics by Analytics Ninja

 A new approach to the average time on page in Google Analytics by Pace

Understanding Google Analytics Time Calculations by Justin Cutroni

Misunderstood Metrics: Time on Page / Session Duration by Analytics Edge

Related posts