Don't have one? Create one ↗
← All courses

Lesson 8 of 15

Engagement Timer

① Connect your GTM container

Paste your container ID to load it into this page. It only ever runs here.

Advanced: use a specific environment

Engagement isn't only clicks, time on the page counts too. GTM's Timer trigger fires on an interval you set, so you can mark a visitor as engaged after they linger.

You'll build a timer that fires every 5 seconds, capped at 6 times, and watch it tick in Tag Assistant. Always set a limit so it doesn't run forever.

Goal

Fire a tag on an interval after a visitor stays on the page, using the Timer trigger.

Build it in GTM

  1. Create the Timer trigger

    1. Go to Triggers in the left sidebar and click New.
    2. Click the trigger-type box and choose Timer.
    3. Leave Event Name as gtm.timer.
    4. Set Interval to 5000 (milliseconds, so it fires every 5 seconds).
    5. Set Limit to 6 so it stops after six fires instead of running forever.
    6. The trigger needs a condition: to fire everywhere leave the default Page URL matches RegEx .*, or scope it with Page Path if you only want the timer on certain pages.
    7. Name it Timer - 5s and Save.
  2. Tag: Custom HTML - Test

    1. Go to Tags → New and choose Custom HTML.
    2. Paste <script></script> (fires but does nothing) and name it Custom HTML - Test.
    3. Under Triggering, add Timer - 5s, then Save.

Debug in Tag Assistant

Copy this lesson's live URL and paste it into GTM Preview, that is the page Tag Assistant connects to. It has the clickable elements, so this page stays clean for reading.

  1. In your GTM, click Preview.
  2. Paste the live URL above and click Connect.
  3. Interact with the live page and watch your tag fire in Tag Assistant.

What you should expect to see

Every 5 seconds a Timer event (gtm.timer) appears in the timeline and your tag fires, stopping after 6 (your limit).

Verify your container

Built it? Export your container, Admin → Export Container, choose your workspace, then drop the JSON here to check it against this lesson.

Drop your container .json here

or browse · checked in your browser, nothing is uploaded

0 of 15 lessons complete