Lesson 7 of 15
Scroll Depth Tracking
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
How far down the page do people actually read? GTM's Scroll Depth trigger answers that, firing at thresholds you set, typically 25, 50, 75 and 100 percent of the page height.
You'll turn on the Scroll Depth variables, build one trigger for all four thresholds, and watch each fire once as you scroll this page to the bottom.
Goal
Fire a tag at 25, 50, 75 and 100% page depth, using the Scroll Depth trigger.
Build it in GTM
Enable the Scroll Depth variables
- Go to Variables in the left sidebar and click Configure at the top of the Built-In Variables section.
- Switch on
Scroll Depth Threshold(andScroll Depth Units/Scroll Directionif you want them on your tag).
Create the trigger
- Go to Triggers in the left sidebar and click New.
- Click the trigger-type box and choose Scroll Depth.
- Tick Vertical Scroll Depths, choose Percentages, and enter
25,50,75,100. - Name it
Scroll - Verticaland 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
Scroll - Vertical, then Save. On a real tag you'd sendScroll Depth Thresholdas a parameter so you know which threshold fired.
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
Scroll Depth event at 25, 50, 75 and 100 percent. Each one fires your tag, and the Scroll Depth Threshold variable shows the percentage.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