Track Time Spent With Timer Triggers In Google Tag Manager

Average time on page is one of the biggest web analytics lies that a lot of us consultants accept, without doing anything about it. First, read how Google Analytics calculates session durations. Its very straight forward. And then, get started with setting up Timer Triggers to measure your website visitors more accurate.

A quick explanation on how Google Analytics calculates session durations, if you didn’t follow the link above:

Google Analytics Session Duration

The user spent 10 minutes on the website. First interaction at 10:00, followed by another interaction at 10:05 (the user have now spent 5 minutes on the website) and then navigates to the third page at 10:10 (the user have now spent 10 minutes on the website).

Google Analytics does not understand when the user close the browser tab. If the user spends 15 extra minutes on page 3 and then close it – no further interaction have been made. No data to collect. No hit sent. But we can change all this with the help of the awesome Trigger Timers in Google Tag Manager.

Setting up a Timer Trigger

To create your Timer Trigger, head on over to your Google Tag Manager account and hit up your list of Triggers. Create a new Trigger and choose Timer as the Trigger Type.

The interval is set in milliseconds (30 seconds is 30 000), limit the Trigger to fire once and the set the conditions for the Trigger to activate. For a small website, like this blog, you can choose all pages. But for big websites, make sure you don’t set up these Triggers for all pages. You might get overrun with Hits.

Timer Trigger in Google Tag Manager

Push the Timer to Google Analytics

After we’ve set up our Timer Trigger, we’re going to create a Tag that push an Event to our Google Analytics Property. Decide on how you want to sort the Event Category, Action and Label in a way that follows the rest of your Event Tracking logic for easy managing them all in your Google Analytics account.

Choose our newly created Timer Trigger, save, preview and (if it works) publish.

GTM Tag Event for the Timer Trigger

You can create a variety of Timer Triggers and Tags this way. 30 seconds, 60 seconds, 90 seconds – you get the picture.

Just keep in mind the amount of Hits your new setup will collect. You can always review the Hit Volume in the admin interface of Google Analytics under Property Settings:

Property Hit Volume

Subscribe to the newsletter

Subscribe to the newsletter to get the latest posts once a month, including tips and unpublished ideas about digital marketing.


Posted

in

by

Comments

3 responses to “Track Time Spent With Timer Triggers In Google Tag Manager”

  1. Markus Avatar
    Markus

    Easy way to measure time with gtm, I had no idea.Thanks!

  2. Lukas Avatar
    Lukas

    Can you do something like: more than 2 minutes on the page?

    1. Per Pettersson Avatar

      Of course! You can set the timer to whatever you like.

Leave a Reply

Your email address will not be published. Required fields are marked *