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
Create the Timer trigger
- Go to Triggers in the left sidebar and click New.
- Click the trigger-type box and choose Timer.
- Leave Event Name as
gtm.timer. - Set Interval to
5000(milliseconds, so it fires every 5 seconds). - Set Limit to
6so it stops after six fires instead of running forever. - The trigger needs a condition: to fire everywhere leave the default
Page URLmatches RegEx.*, or scope it withPage Pathif you only want the timer on certain pages. - Name it
Timer - 5sand Save.
Tag: Custom HTML - Test
- Go to Tags → New and choose Custom HTML.
- Paste
<script></script>(fires but does nothing) and name itCustom HTML - Test. - 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.
- In your GTM, click Preview.
- Paste the live URL above and click Connect.
- Interact with the live page and watch your tag fire in Tag Assistant.
What you should expect to see
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