The effect of tabs on the time on page metric

Here’s an interesting question I received from an analyst:

Question: Do you know how Google Analytics handles browser tabbing when it comes to reporting on time spent per page? I know how they treat multiple open tabs from a site as a single visit/visitor, but how do they calculate time per page? If I have bunch of tabs open at the same time but only interact with one of them, or jump from one to the other while all tabs are open? or have a tab which is not from the same site and I go back and forth between those tabs?

Answer: First, you are right about the single visit/visitor aspect. Google Analytics as absolutely no clue about the fact you are using multiple tabs* (and of course, if some of the tabs are pointing to other sites). As long as the session is alive – by default 30 minutes between two web analytics “hits” – the session is still alive. The default session length can be changed with _setSessionCookieTimeout.

Let’s say we have pages the following situation (see picture at right):

  • Pages A1 & A2 for tab A, and pages B1, B2 for tab B.
  • Page A1 is loaded at time T1, A2 at time T3.
  • Page B1 is loaded at time T2 and B2 at T4.

Time on page is calculated by taking the time stamp between Google Analytics calls (or “hits”). I don’t have visibility over the specific algorithm but here’s what I think is happening:

  1. Simple case: You go from A1 to A2, no problem, as usual, the timestamp of the call on A2 is substracted from A1 to get the time difference. Therefore, time on Page A1 = T3 – T1. Avinash wrote a nice blog post on the time on page and time on site metric, so I won’t repeat the details about this example here.
  2. Tab browsing case: If the sequence is A1, B1, A2, B2, the web analytics server can look at the referrer and will see A2 was coming from A1, and B2 was coming from B1. Therefore, the same calculation of A2-A1 and B2-B1 can be made: time on Page A1 = T3 – T1, and time on page B1 = T4 – T2.

The conclusion is tabbed browsing doesn’t affect time on site or time on page calculation.

Wondering what will be time on site? Simply T4-T1. The time on B2 isn’t included in the calculation.

*But… some web analytics tools actually use the onUnload or onMouseOut standard events to collect information about lost focus on a page. In that case, the calculation of time on page (and on site) can be more precise and actually acount for the time where the focus is on another tab.

Makes sense?

Update: a reader went to the extent of creating a real test and came to the conclusion that in fact, GA doesn’t account for time browsing at all, so time on page A1 is calculated as T2-T1, B1 is T3-T2, and time on page A2 is calculated as T4-T3. You can read the post (in French) here.

Stéphane Hamel

Director of Strategic Services - Create innovative company-wide solutions and digital measurement strategies to deliver maximum value and insight for Cardinal Path clients.

Share
Published by
Stéphane Hamel

Recent Posts

GA4 and BigQuery: why might data not match?

One of the most common questions we get about GA4 isn’t really about GA4, itself.…

2 weeks ago

GA4 + Optimizely: Integration Overview

Using engagement data to improve website performance is a near-universal use-case for users of Google…

2 months ago

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

3 months ago

This website uses cookies.