Track Active Time On Page Using Google Tag Manager

Track Average Engagement time using Google Tag Manager to better understand active time a user is on a page or website. These days customers may find your site or product and keep a tab open for hours in between other tasks while spending.

This visit is recorded in Google Analytics and the time where the user is inactive may inflate the Google Analytics metric Average Time on Page.

Even worse – If your user finds a detailed blog posts and reads it ALL DAY (like I sometimes do) and then close the browser (and not visiting another page) – they are marked as a bounce and don’t contribute to Average Time on Page because they never visited another page.

Seriously – Google Analytics defines a bounce as “A bounce is a single-page session on your site”

When you bounce – the time you spend on that single page isn’t sent to Google Analytics. That’s a problem I’ve been trying to address.

I was able to successfully capture “EngagedTime” on site based on the instructions in the two posts below:

Part 1: https://www.simoahava.com/analytics/track-content-engagement-via-gtm/
Part 2: https://www.simoahava.com/analytics/track-content-engagement-part-2/

I stopped at step 4 in Part 1 so that I can track without using User Timings in Google Analytics. User Timings has a limit of 10,000 sessions/day.

Part 2 of the instructions tracked active time on page using a Custom Metric, measuring engagement time in seconds.

With Tag Manager, we track the length of time a user is active or engaged based on the following behaviors:

1. Mousedown
2. Keydown
3. Scroll
4. Mousemove

If we see more than 5 seconds where they haven’t completed one of these behaviors – we indicate they are “idle” and do not track that time as engaged.

Every 15 seconds in Tag Manager an event is fired that passed the  cumulative “engaged” time on site. With this solution we can track active time on page to better understand the amount of time a user is focused on your content, and cut down on inflated Average Time on Page that can occur when a user is inactive.

If you need help tracking data about your visitors – Contact Me