Google Analytics Metrics – Time on page & Session duration

  • Ethereum
  • MetaMask
Scan to Donate Ethereum to 0xe95BF07c484dcC33Af16a57A7a1cB725906bc57D

Donate Ethereum to this address

If you find the blog useful and would like to show some support, a little donation of Ethereum would help to keep this site alive. Appreciate it!

Donate With MetaMask

Donate ETH Via PAY With Meta Mask

In this series, we hope to exhaustively cover every single Google Analytics metric out there to give everyone a better understanding of the data we are dealing with. This might take a long time, so bear with me! In this article, we will cover two of the most misunderstood metrics out there – time on page and session duration.

First Impression

When we talk about time on page and session duration, what are the first definitions that come into your mind? Time on page – The amount of time spent on a page. Session duration – The amount of time spent in a single session. Seems straightforward right? N.o.p.e. Take a look at the screenshots below… Average time on page = 0 second? How is that possible? Same goes for average session duration. If the metric definitions above were accurate, this should have never happened. And if that’s not proof enough, try looking at your data and you will most probably find that in some cases, average session duration is less than average time on page. So what’s the issue here?

True Definition

There is nothing wrong with the definitions given above. Let us recap. Time on page – The amount of time spent on a page. Session duration – The amount of time spent in a single session. Then what’s the problem?

Technical Limitation

The reason why we are unable to accurately capture time on page and session duration is… the way vendors calculate them. It’s not the vendors’ fault that they did a poor job at capturing these 2 time metrics. It’s more of the technical limitation they are facing. Let’s look at one of the possible scenario: The image above depicts an user visiting 3 pages before heading for the exit. The time indicated on top of each page shows when the user first landed on the page itself. Notice the ??? on top of the user exit? I’m not trying to make you guess here. That is the technical limitation we spoke of earlier. There is no good way for the vendors to tell when the user exits a website. Internally, we could have the developers capture the time by making use of some functions (onunload, onbeforeunload, etc) that supposedly fire before an user exits a webpage. But it isn’t that simple. Every browser works differently in one way or another (especially Safari thanks to Apple always wanting to be the “special” kid. Yay!), which also means that those functions mentioned previously work differently on different browsers. Long story short, it is almost impossible to capture the time an user exits a webpage.

Time on page & Session duration

By now, you should have a rough idea where I am going with this. Let’s revisit the user journey again: Time on page is calculated based on the timestamp of next page less the timestamp of the page in question. Time on page 1 = 11:04 – 11:00 = 4mins Time on page 2 = 11:06 – 11:04 = 2mins Using the knowledge gained… Time on page 3 = ??? – 11:06 = 0min Since the vendors can’t determine the time when the user leaves page 3, all they can do is to record a value of 0. Therefore… Session duration = 4mins + 2mins + 0min = 6mins There you go. We have explained how time on page can be 0, but that doesn’t account for why average duration session can be less than average time on page.

Average time on page & Average session duration

The image above depicts a bounce, which occurs when an user exited the website after visiting only one page. As you can imagine, both time on page and session duration are 0 in this case.

Average time on page

Let’s take a closer look at Average time on page.

Average time on page = Sum of time on page / (Total no. of pageviews – Total no. of exits)

You can see that it is divided by the total number of pageviews less the total number of exits. What it means is that we are not taking into account all the bounces in our calculation. All those time on page with a value of 0? They are excluded! With this, we have a clearer definition for average time on page:

Average amount of time spent on the page where users have visited at least 1 other page beyond this page

It’s a mouthful, but that’s what it is. Note that this metric is slightly optimistic, in the sense that we have omitted the timings where users came to our site and left without visiting another page (bounce).

Average session duration

Average session durationSum of session duration / Total no. of sessions

For average session duration, somehow, we do not exclude sessions with a value of 0. Don’t ask me why, but that’s what Google Analytics has decided to go with. Let me take a stab at defining average session duration:

Average amount of time approximately spent in a session less the amount of time spent on the last page visited, including sessions with a value of 0

Phew. That was crazy.

In Conclusion…

My advice is to stop obsessing over any form of time metric. Apart from the poorly calculated values due to technical limitation, these time metrics do little to provide any actionable insights. When the time spent on a page is 5 minutes, are we able to tell whether the user was engrossed in the content or was furiously looking for something he/she couldn’t find? There’s no good way to tell. Without the help of other metrics (e.g. button clicks, form completion, etc), there is no way we can make sense out of these time metrics. And if we do have “other metrics”, there isn’t really a use for any time metric anyway.    
About Zenny Tan Zhong Ming 32 Articles
Let's connect on LinkedIn ( ).

Be the first to comment

Leave a Reply

Your email address will not be published.