How to Use Timer Triggers in Google Tag Manager [V2]

  • Clock

How to Use Timer Triggers in Google Tag Manager [V2]

Event Listeners have been an extremely useful feature in Google Tag Manager, making it easy to capture on-page interactions like link clicks, downloads, button clicks, and form submissions. By listening for events and sending data to GA, you can get more detailed and more precise information about how people are using your site.

In GTM’s Version 2 interface, listening for events is now more efficient than ever.

Instead of requiring both a Listener tag and a firing Rule as before, listening for an event can now be accomplished with a single Trigger. (In V2, triggers are the upgraded version of rules.) Hence, a trigger can now be used to both listen for an event and fire the desired tracking tags as a result.

We had previously written a tutorial on How to Use Timer Listeners in Google Tag Manager. We can now do the same with Timer triggers in GTM Version 2.

The most common way that we use Timer triggers is to track the time a user spends on a particular page. Wait, doesn’t Google Analytics track Time on Page automatically? Well, yes and no. GA calculates time spent on a given page by taking the difference between the timestamp of that pageview and the timestamp of the subsequent hit. But if a pageview is the last (or only) hit in the session, GA will assign it a time of zero.

That’s where Timer triggers come in! If you’re using GTM (and if you’re not, you should be), Timer triggers give you a simple way to get more precise metrics for time on page, session duration, and bounce rate in Google Analytics.

Let’s now take a look at how to implement Timer triggers in GTM Version 2.

Basic Implementation

  1. To get started, you will need to have a Google Tag Manager account (in the version 2 interface) and permissions to edit your website’s GTM container.
  2. Create the Timer trigger as follows:
    1. Add a new trigger. Choose Timer as the event type.
    2. Enter the desired timer interval in milliseconds, e.g. For a 30 second timer, enter 30000, and set the timer limit to 1 (For recurring timers, see Advanced Implementation instructions below).Timer Triggers GTM
    3. Enable the timer trigger on all pages by using the condition Page URL matches RegEx .* or enable on a subset of target pages.Timer Triggers - Enable When Conditions
    4. Set the trigger to fire on All Timers.Timer Triggers GTM - All Timers Setting
  3. Create a new Universal Analytics event tag. Enter appropriate values for at least Event Category and Event Action. Set the tag to fire on the timer trigger you created.

That’s it! You can now use GTM’s Preview & Debug mode to see your new tag in action. Once you are happy with the configuration, save a new container version and publish.

Advanced Implementation

Now, let’s crank it up a notch. What if you want to record multiple timer events from the same timer? A single 30 second timer is better than nothing, but what if visitors are spending 5, 10, or as much as 20 minutes on a single page before leaving your site? With only a 30-sec timer, your session duration metric could still be hugely misleading.

Here is an implementation strategy to fire recurring timer events every 30 seconds and appropriately label those events in GA:

  1. As above, you will need access to your GTM container.
  2. Create the Timer trigger.
    1. Add a new trigger. Select Timer as the event type.
    2. Set the timer interval as above, but leave the limit field blank. This will allow the timer listener to fire indefinitely until the user leaves the page or closes their browser.
    3. Since a recurring timer will generate a lot of events, in step 3, you may only wish to enable this trigger on certain pages, e.g. your home page, articles and blog posts, or other pages that have high exit rates.
  3. Create two new variables to capture the timerEventNumber and timerInterval auto-event variables as follows. At least right now, GTM does not create these macros by default:
    1. Create a new variable named timerEventNumber, set to the value of the gtm.timerEventNumber variable in the data layer. This will return the count of the number of times that the timer listener has fired on the page. Timer Triggers
    2. Create a new variable named timerInterval exactly as above, but with gtm.timerInterval as the data layer variable name. This will return the timer interval that you have specified in the listener tag.
  4. Configure your Universal Analytics event tag as follows,Timer Triggerswhere {{timerEventLabel}} is a custom JavaScript variable defined as:
    function() {
      var elapsed = {{timerEventNumber}} * {{timerInterval}} / 1000;
      var min = Math.floor(elapsed/60);
      var sec = elapsed % 60;
      return min + 'm ' + sec + 's';
    }

    The timerEventLabel macro returns the elapsed time in minutes and seconds, based on timerEventNumber and timerInterval.

  5. Save, test, and publish!

You can of course modify the variable names or interval length to better match your current website and GTM implementation.

For more information, check out the Google Analytics Help Centre article about Triggers in Google Tag Manager [V2].

Let us know what you think about Timer triggers and how you are utilizing them in GA!

By |2018-07-26T10:15:18-04:00March 25, 2015|57 Comments

57 Comments

  1. JP 2015-05-11 at 10:08 - Reply

    Thanks for this update for V2.

    If your site is javascript based (angular in this case), the URL can change as you move around the site but there is no page refresh to reset the timer, so the timer just keeps going. How do you recommend resetting it if your URL changes without a page refresh?

    • Marc Soares 2015-05-11 at 10:58 - Reply

      Hi J.P.,

      Unfortunately, GTM does not provide the ability to cancel a timer once it’s initiated. The easiest way to achieve a page timer on a dynamic site would likely be to code your own timer function (e.g. setInterval) in a Custom HTML tag. The function should push an event to the dataLayer after a specified interval (essentially replicating the GTM timer functionality). Upon each URL change, you would clear and re-initiate the timer function. You would then create a custom event trigger to match the “timer” event sent from your function. With this configuration, there would only be one timer running and it would reset itself on each URL change.

      Hope that helps,
      Marc

  2. Ivan 2015-05-26 at 02:42 - Reply

    Hello.

    And what if I want to track all the visitors who spen more then 60 seconds on the website. Even if they visited more then one page.

    Is there a way to start timer on the first page in the session and then not to refresh it when user refreshes page?

    Thanks in advance!

    • Marc Soares 2015-05-26 at 09:23 - Reply

      Hi Ivan,

      Google Analytics calculates the total session duration by default. So, you could create a goal in GA to convert when the Session Duration is greater than 60 seconds.

      However, the default session duration is understated since GA assigns a time of zero to the last page of the session. This is where the page timer comes in. By sending the timer event (e.g. at 30 sec), you will be providing GA with an additional hit so that even the last page of a session will have a non-zero time (if the user spends at least 30 sec on the page).

      So, the short answer is that you can track visitors who spend >60 sec on the site by configuring a goal in GA. By also implementing page timer tracking, your >60 sec goal will be more precise.

      Hope that helps!
      Marc

  3. Denis 2015-06-15 at 09:16 - Reply

    Hello Marc

    Help me please with conversion duration.
    I should save first and second conversion’s time and send t2-t1 by Universal Analytics time tag to User Timings report.

    I can’t understand how can I save timestamps for t1 and t2 with GTM.

    • Marc Soares 2015-06-15 at 15:30 - Reply

      Hi Denis,

      A Timer trigger is useful for firing a tag at a defined interval, but sounds like this may not be a fit for your situation.

      If you need to save a timestamp for use with GTM, you can generate the current time with some simple JavaScript (e.g. new Date();) and push it into the dataLayer.

      For example:
      currentTime = new Date();
      dataLayer.push({ 't1' : currentTime });

      If you do the same at t1 and t2 on the same page, you can then setup a custom variable in GTM to calculate the difference and send the result to GA with a Universal Analytics tag.

      Hope that helps!

  4. Jeremy C 2015-07-01 at 17:06 - Reply

    Hello!

    Great post! I was wondering how one would add this to something like scroll tracking? The use would be to see if a user is scrolling down the web page to actually read/interact with a page, or are they just scrolling to the bottom the second they hit the page. I was trying to use the 2 data layer variables and the java script variable and add it to a customer HTML tag but was running into issues. Any advice would be great!

    Thanks!

    • Marc Soares 2015-07-02 at 09:37 - Reply

      Thanks Jeremy!

      It is certainly possible to combine scroll tracking with timer tracking. Specifically identifying “scroll-to-bottom” behaviour can be approached in a few different ways, depending on what you’re looking for. Since you have run into some issues, we’ll contact you offline to discuss further.

      Marc

  5. Manoj 2015-07-20 at 14:38 - Reply

    Hi,
    I’m new to this GTM thing, my question is very much beginners question. i have google analytics code already added to my website now what should i do to use tag manager ?
    1. should i remove my analytics code from website & add tag manager code that i get after i sign up in google tag manager ? or i have to keep them both in source code.
    2. Why people in online tuorials, create tag “GA universal tracking code” When you aleardy have “GA universal tracking code added to your website in source ?
    Please help me with this.

    • Kristina Brown 2015-07-20 at 16:20 - Reply

      Hi there,

      Thank you for your questions!

      Google has recently released a Google Tag Manager Fundamentals Course that will help answer your questions and get you started in Google Tag Manager.

      In the Setup and Workflow (Web) page under the “Adding the Container Snippet” section, Google explains, “Be sure to remove tags (e.g. Google Analytics, AdWords Conversion Tracking, etc) from the site pages at the same time.”

      If you would like our help offline, please give us your permission to contact you via email.

      Hope this helps!
      Kristina

      • Manoj 2015-07-21 at 01:12 - Reply

        Hi Kristina Brown,

        Thank you so much for your answer. Yes please you can contact me on my e-mail address.

  6. Kyle 2015-07-20 at 19:12 - Reply

    I think I’ve missed a critical step here. I’ve got the triggers and tag set up as you described (except with a 15 second interval) but I’m not clear how this data will show up in Analytics.

    From previewing I can tell the tag is firing every 15 seconds, so that’s great, but with the label being set as {{timerEventLabel}} I’m not sure what I should be seeing in Analytics.

    My Goal is called “Time on Page” and I copy-pasted over the category, action, and label from the Tag itself, so will analytics just start indicating every time the tag fires is a Goal completion?

    I guess my main problem is that I’m unclear how this data will be presented to me in GA

    • Kristina Brown 2015-07-21 at 11:34 - Reply

      Hi Kyle,

      Thanks for reaching out!

      To view your Events in Google Analytics you can refer to the About Events page under See Event data.

      To see your Event as a Goal you need to set this up in GA. Check out the “Event Goal details” on this Analytics Help page.

      If you would like our help offline, please give us your permission to contact you via email.

      Hope this helps!
      Kristina

      • Kyle 2015-07-21 at 14:53 - Reply

        Oh no, thanks though! This is exactly what I needed, I’m self-taught about all of this stuff.

        It’s weird, in all of the 20-30 GTM articles I’ve read online, not ONE has simply mentioned “once your tags are set up, go to “events” in GA to see the actual results”. It never even occurred to me that there’s likely some documentation on Google itself that explains how to connect the two. So thanks, these links are very helpful!

        • Kristina Brown 2015-07-22 at 09:17 - Reply

          You are welcome Kyle!

          Thanks again for reaching out.

  7. Ruben 2015-08-05 at 10:05 - Reply

    Hi Marc,

    Thanks for the post! Just a quick check: if I follow the advanced implementation as you’ve described, I get two tags (one with the event limited to 1 time, one with unlimited events)? Or should I adjust the tag as created with the basic implementation?

    Thanks in forward!

    • Marc Soares 2015-08-05 at 10:42 - Reply

      Hi Ruben,

      You can certainly modify your timer trigger from the basic implementation (i.e. remove the limit value) instead of creating a new trigger. However, keeping both would allow you to have both configurations running on different parts of your site. For example, you may wish to have a single 30 sec timer running on all pages and fire the continuous timer only on certain pages (e.g home page).

      Marc

  8. Mark H 2015-09-07 at 05:57 - Reply

    Hi, I just implemented this on Friday, using the advanced version with the limit field empty. It worked great, but produced 94000 events in 3 days because someone left a page open for 55 hours!
    As this is highly likely to be garbage data, i’d like to put a limit on it, but also, i’d like to reduce the interval as time goes on. So, for example. I’d like to record every 30 seconds for the first hour, then after that, every 60 seconds up for up to another hour and then cut if off after that. How could I achieve this? I think to create two triggers and two tags with different intervals and limits, but how to I get the 2nd trigger to wait for an hour before beginning to fire?

    Thanks, Mark

    • Marc Soares 2015-09-08 at 09:23 - Reply

      Hi Mark,

      Wow, 94000 events! Yes, that’s the danger of using an unlimited timer. You should definitely consider placing a limit on the timer trigger and restricting the continuous timer to only select pages.

      Keep in mind that, by default, a GA session will timeout after 30 minutes of inactivity. So, if a user leaves their browser open, their session would end after 30 min. However, by continuously firing events, you are creating “activity” that prolongs the user’s session. Thus, you no longer have a built-in way of ending the session after the user stops being active on the site.

      In order to get your 60 sec timer to fire for only the second hour, you can try adding a “blocking” trigger to your GA event tag. Basically, create another trigger that matches the first 60 events from your 60 sec timer, and add it as an exception. I suggest creating a Custom Event trigger that matches the same event name as your 60 second timer (e.g. gtm.timer60) and then add a condition to match the first 60 events, e.g. {{timerEventNumber}} <= 60. The result should be that your 60 sec timer will start firing immediately, but events will only get sent to GA after an hour. This is not a configuration that I have tested myself, so let me know if it works out for you! Marc

  9. Ben 2015-09-20 at 21:00 - Reply

    Hey Marc,

    I followed your instructions to the word but still keep getting the NaNm NaNs problem in GA. I copied and pasted your javascript, named everything word for word but still the same.

    Thoughts?

    • Marc Soares 2015-09-21 at 09:13 - Reply

      Hi Ben,

      The NaN is the result of a “Not a Number” error in JavaScript. This indicates that something is going wrong in your timerEventLabel JavaScript variable. GA is simply capturing the value being sent from the page. If you’ve already checked your timerEventLabel code, also check that you have properly defined the timerEventNumber and timerInterval variables. Your GA event tag should also be set to fire upon the Timer trigger that you created, otherwise the timer variables will not get populated.

      Let me know if it still doesn’t work out.

      Marc

      • Ievgen Skrypets 2019-01-09 at 03:41 - Reply

        I have the same issue. When I pause first example and run only Advanced Implementation – all works fine

        • Marc Soares 2019-01-09 at 17:06 - Reply

          Hi there. Can you confirm that you’ve followed the instructions in the article, and the suggestions in my previous comment?

          • Ievgen Skrypets 2019-01-10 at 01:22 - Reply

            Hi Marc, I follow your instruction step by step. When I pause base implementation and setup advanced with the different named variables all work fine 🙂

  10. Matt 2015-09-25 at 14:12 - Reply

    I’m also having the NaN problem. I’ve double and triple checked everything. I don’t see a single difference, but my event labels all say NaN.

    If I have my event timer set at 20s, will a new event be created every 20s or will it generate a single event with the amount of a time a user stayed on the page? For example, if there’s just one user who stays on a page for 60 seconds, will I get three events numbered 1 (20 seconds), 2 (40 seconds) and 3(60 seconds). Or will I just have a single event labeled 3, so I know that visitor was on my page for a full minute?

    • Marc Soares 2015-09-25 at 16:07 - Reply

      Hi Matt,

      Regarding the NaN problem, can you let me know what values are shown in the GTM Preview panel for the timerInterval and timerEventNumber variables upon the gtm.timer event? (Select the gtm.timer event in the left panel, then click the “Variables” tab.)

      To answer your other question, if you set the Interval to be 20000 (i.e. 20s), the timer will fire a data layer event every 20s until it reaches the specified Limit count. With the advanced implementation working as described in the post, you would get a separate event sent to GA every 20s (i.e. 20s, 40s, 1m 0s). If the visitor leaves your site after 60s, GA will then record a time on page of 60s. Without any timer events, GA would not calculate a time for that page, since there was no subsequent hit after the pageview.

  11. Bart 2015-10-23 at 06:13 - Reply

    Hi, great article. I’m wondering though, would the basic implementation with an limit of say, 99, instead of 1 have the same effect as the advanced implementation?

    Can such a high limit negatively impact performance/reporting?

    Looking forward to your response. I feel like I’m missing something :).

    Regards,
    Bart

    • Marc Soares 2015-10-23 at 09:56 - Reply

      Hi Bart,

      The advanced implementation allows you to have each event labelled with the elapsed time (See the timerEventLabel variable). So, you will get events in GA labelled as 0m 30s, 1m 0s, 1m 30s, etc.

      With the basic implementation, you could certainly set a higher limit, but you won’t be able to dynamically label each event with its respective time.

      Google Analytics has limits of 500 hits per session and 200,000 hits per user per day (https://developers.google.com/analytics/devguides/collection/gajs/limits-quotas).

      Once the GA hit limits are reached, GA will not process any more hits for that session/day. So, if you implement recurring timers throughout your site, you could quickly encounter these limits, which would negatively impact your data quality and precision.

      Hence, we suggest recurring timers be used sparingly, e.g. only on specific pages, and only in order to accomplish a specific measurement objective.

      Marc

  12. Dan 2015-11-02 at 15:42 - Reply

    Hi, I got most of this – but got lost on Step 3 after duplicating the UA and creating the Event tag I need to “Enter appropriate values for at least Event Category and Event Action” but what are my appropriate values?

    • Marc Soares 2015-11-03 at 09:13 - Reply

      Hi Dan,

      Google Analytics requires at least the Event Category and Event Action fields to be populated for an event hit. You can enter any values that would appropriately label this timer event within your GA implementation. When you look at the data in GA, you should be able to tell where this event came from.

      If you are doing the basic implementation, you may choose to use something like Event Category: Timer and Event Action: 30s. For the advanced implementation, take a look at the screenshot in step 4 for some example values.

      Hope that helps!

      Marc

  13. Derek 2016-02-02 at 09:56 - Reply

    Fantastic tutorial. Thanks for posting this!

  14. Natalie 2016-02-11 at 09:56 - Reply

    Hi Marc,

    I followed your steps to set-up the tags/triggers which were really easy to follow. However instead of just implementing the advanced timer on one page we need to have the event firing across the whole site. Based on this though I set a limit of firing 30 times. In my data however it shows past 30 minutes. There’s a large drop-off after this point i.e. 300 to 5 from 30 to 31 minutes, but i only need the data to show up to the 30 minute mark and it currently runs into the 1000’s. Is there anything else I can do to stop this from happening?

    Thanks,

    Natalie

    • Marc Soares 2016-02-12 at 10:42 - Reply

      Hi Natalie,

      Glad you found the post helpful! Would you be able to share some more information about why you need the continuous timer to fire on all pages?

      As far as GTM goes, setting a limit of 30 and an interval of 60000 milliseconds should mean that you will get at most 30 timer events at 1-minute intervals. Have you tried to replicate the issue? (i.e. leaving a page open for longer than 30 min and confirming whether or not the timer continues to fire)

      You could try adding a condition to your timer trigger, so that instead of firing on “All Timers”, you only fire the event when the timerEventNumber is <= 30 (This is what the Limit field is supposed to do). Keep in mind that Google Analytics will process a maximum of 500 hits (pageviews and events) per session. So, a continuous timer across all pages means that this limit will be reached much more quickly. After reaching 500, GA will not process any more hits for that session.

      • Natalie 2016-02-19 at 06:26 - Reply

        Hi Marc,

        Thanks so much for coming back to me!

        We need this functionality so we can evaluate annual visitors to site that stay a certain length of time and also to get around the time on site time stamp issue.

        I’ve not replicated this myself, but will try this and see if I come across the same issue.

        It sounds like the condition may also be an option to ensure it definitely limits the amount of hits. If someone stays on site for 30 minutes or over and the tag fires 30 times -would this count as 30 hits and reduce the risk of exceeding 500 hits?

        Thanks,

        Natalie

        • Marc Soares 2016-02-19 at 14:39 - Reply

          Hi Natalie,

          Can you elaborate on the “time on site time stamp issue” that you mention? I’m not sure that I have encountered this before.

          Since Google Analytics automatically calculates time on page and session duration based on consecutive pageviews, a timer event is most useful on the last page of a session. If visitors spend a long time on a page, then immediately leave the site, GA would not count any time for that final page. However, with the timer, GA will calculate time up until the last timer event that it receives.

          Placing a condition on the timer should help limit the number of hits (Sending 1 event every minute for 30 minutes would produce at most 30 hits on that page). You may also try to limit it further by only enabling the timer on the pages where you expect visitors are spending the most time and which are likely the final pages of their sessions.

          Marc

          • Natalie 2016-02-26 at 10:49 - Reply

            Hi Marc,

            Whne i mentioned the time stamp issue, I was referring to what you mention about GA calculating time on page and session duration based on consecutive pageviews. I have already set a limit of 30 on the trigger configuration but it’s still showing numbers greater than this.

            Thanks,

            Natalie

            • Marc Soares 2016-03-10 at 13:57

              Hi Natalie,

              I came across a couple articles that may be of interest to you. These are written by Simo Ahava, who is one of the leading GTM experts. He describes a method for getting more precise data on the amount of time users engage with your site. Perhaps you could look into this as an alternate method for more precisely measuring time on site:

              Tracking Content Engagement via GTM

              Track Content Engagement Part 2

  15. Kyle Lyons 2016-02-12 at 11:32 - Reply

    Anyone who’s implemented this feature should probably check their GA account to see if they’re getting any landing pages labelled “(Not Set)” – Seeing this indicates your visitors’ sessions are being broken up and it can throw off your data.

    I had the issue persist for quite some time, and nothing seemed to be able to fix it (Setting the priority to “99” for the GTM pageview tag, setting a firing sequence, etc…). I eventually realized you can (mostly) eliminate the problem by forcing the name for ALL tag listeners to be blank.

    • Marc Soares 2016-02-19 at 14:15 - Reply

      Hi Kyle,

      Implementing a timer event should not cause any sessions to break, assuming that your base pageview tracking is consistently firing on each page.

      There is likely another issue causing your landing pages to be “(not set)”. This can sometimes be the result of spam traffic and bots.

  16. Andrea 2016-04-08 at 09:47 - Reply

    Awesome post, thanks! What if you want to track TOP and clicks on different buttons on the site – BUT they need to roll up into one conversion in GA, but separate events as well?

    For example, I have several questions with buttons that expand to show the answer. I need to:
    1. Track general TOP – thanks to you, I got that.
    2. Track each expandable question click – I got that
    3. Track an overall TOP AND however many clicks that happen over 30 sec – that’s what I am stuck.

    Any suggestions?

    • Marc Soares 2016-04-08 at 11:16 - Reply

      Hi Andrea,

      Glad you found the post helpful!

      This is an interesting question. There are a number of ways you could approach this, depending on exactly what you are looking to understand and analyze.

      If you have separate events for “spent 30 seconds on page” and “clicked a button”, you could configure a separate goal for each in GA. You could then create an advanced segment to capture only sessions that have completed both goals. This would tell you the proportion of people who spend 30 seconds AND click a button.

      Would that satisfy what you’re looking for?

      • Andrea 2016-04-12 at 11:08 - Reply

        Thank you responding Marc! I will have to try and see if this will work – my work plan for today. 😉 I know my manager prefers to have all of it within a GA goal without having to apply advanced segments. But I don’t see another way to do this. If you have any other suggestions I would certainly appreciate it!

        • Marc Soares 2016-04-12 at 12:12 - Reply

          Hi Andrea,

          If you are looking to have a single goal for “spent 30 seconds AND clicked a button”, you could accomplish this by including the time in one of the event dimensions of the click event.

          For example,
          Event Category: Button Clicks
          Event Action: Clicked Answer
          Event Label: {{timerEventLabel}}

          If the 30s timer has elapsed, then the button click event will have an event label of 30s. Then you could configure your goal to match the event category, action, and label.

          • Andrea 2016-04-12 at 13:55 - Reply

            Wow! That’s awesome! Thanks very much! I can’t wait to try this out! I appreciate your help.

            Thanks again,
            Andrea

  17. Andrea 2016-04-25 at 16:56 - Reply

    I wanted to give you an update on this task. For some reason I wasn’t able to get the two events to work as one as per your suggestion, so I am going to have to go with the advanced segment in GA. Hopefully I’ll be able to get what I need that way. Thanks so much for the suggestions!

  18. Michael 2016-12-14 at 10:45 - Reply

    Great post – super helpful! Quick question though – what should be the Trigger for the GA Event in step 4 of the Advanced Implementation – the original Timer Trigger that was created?

    Thanks

    • Justin S.J. Lee 2016-12-14 at 13:04 - Reply

      Hi Michael,

      Thanks for the comment, glad you found this helpful.

      The correct trigger you should use is the one you created in step 2.

  19. Yok 2018-06-04 at 04:57 - Reply

    This is a fascinating. Attempting to up my analytics game and identifying the data-driven processes to achieve this is difficult to find and/or understand.

    I do have a question, if you have a moment: I created the two new variables per the instructions above (created via the dropdown toggle menu displayed below the “Limit” when creating a new trigger) and saved these.

    How do I implement them? By which I mean, in that same new trigger window I just opened to create a new trigger, do I add both of these filters at the bottom via the dropdown menu (which they both now appear in)? If yes, do I also add the url and matches RegEx .*? So that the conditions included all 3 variables are set and then proceed to step 4?

    Thoughts?

    Thanks!

    • Marc Soares 2018-06-04 at 14:38 - Reply

      The timerEventNumber and timerEventLabel variables need not be used in the timer trigger itself. Rather, the timerEventLabel variable should be used in the Google Analytics tag, as shown in step 4 of the Advanced Implementation. The trigger configuration can be left the same as in the basic implementation.

  20. Elizabeth C Stephens 2018-06-21 at 15:05 - Reply

    A colleague of mine who has now left the company set this up, and I have just discovered it. But what I’ve found is that it’s double counting our pageviews. I think the issue is with step 2c. He had it set as “Page URL contains columbiamissourian.com.” I need to change that to “Page URL matches RegEx .*”?

  21. Elizabeth 2018-06-21 at 15:13 - Reply

    Follow up on my previous post because I realize RegEx = columbiamissourian.com for us. So here is where our issue might be. The trigger was tied to the main analytics tag and not as a separate event tag. Would that be the reason we are double counting pageviews?

    • Marc Soares 2018-06-21 at 15:42 - Reply

      Hi Elizabeth,

      Yes, that would explain the duplicate pageviews. The timer trigger should fire a separate GA event tag. Right now, your main pageview tag would fire upon page load and then again on the timer trigger.

      Marc

  22. Stella 2018-06-26 at 07:50 - Reply

    Hi,

    I have read your full post. It was quite helpful for trigger implementation.

    But I have one question if you can answer me it is good for me,

    Do I need to use Google Analytics and GTM both for same website?

    Thanks for such a wonderful post.

    • Heather Murphy 2018-06-26 at 11:01 - Reply

      Hi Stella,

      Glad you found the post useful!

      This particular setup requires implementing the above instructions in Google Tag Manager, which will send the events to Google Analytics.

      Heather

  23. Stella 2018-06-27 at 03:24 - Reply

    Thanks Heather for you valuable Reply.

  24. Bob 2018-09-18 at 05:58 - Reply

    not clear where to put the js code for the timerEventLabel

    • Heather Murphy 2018-09-18 at 09:27 - Reply

      Hi Bob,

      When configuring the tag, you will need to create a new User-Defined Variable for timerEventLabel. You will select the variable type of ‘Custom JavaScript’ and enter the provided code.

      Heather

Leave A Comment