Blog

← All articles

How to Set Up Scroll Depth Tracking in Google Tag Manager

TL;DR: GA4 Enhanced Measurement tracks only the 90% scroll threshold. For granular scroll data, create a custom Scroll Depth trigger in GTM with percentage thresholds (25, 50, 75, 90), attach a GA4 Event tag with scroll_threshold as a parameter, and filter by page path if needed. GTM Event Helper can set up scroll-based triggers and tags in seconds via the GTM API.

Scroll depth tracking reveals how far visitors actually read your content. A page might get thousands of views, but if 80% of visitors leave before reaching the second paragraph, that traffic isn't delivering value. Google Tag Manager makes scroll tracking straightforward, but the default GA4 setup only captures one data point — and it's often not enough.

This guide covers the full spectrum: from GA4's built-in scroll tracking to custom GTM triggers, per-page filtering, section-level tracking, and common pitfalls that skew your data.

How does scroll depth tracking work in GTM?

Scroll depth tracking in GTM uses the browser's scroll position relative to the total page height. When a user scrolls, GTM calculates the percentage of the page that has become visible and compares it against the thresholds you configure.

GTM provides a built-in Scroll Depth trigger type that supports two measurement modes:

Within each mode, you can measure by percentages (25%, 50%, 75%) or by pixels (500px, 1000px, 1500px). Percentage-based tracking normalizes across different page lengths, making it the better choice for most use cases.

When a threshold is reached, GTM fires a gtm.scrollDepth event into the data layer. This event carries three built-in variables:

These variables let your GA4 tag capture exactly which threshold was crossed, without needing custom JavaScript.

How do I enable scroll tracking with GA4 Enhanced Measurement?

GA4 includes a built-in scroll tracking feature called Enhanced Measurement. When enabled, it automatically sends a scroll event when a user reaches 90% of the page height. No GTM configuration required — it's handled entirely by the GA4 data stream.

To verify it's active:

  1. Open GA4 Admin → Data Streams → select your web stream
  2. Click Enhanced measurement (the gear icon)
  3. Confirm the Scrolls toggle is on

Once enabled, GA4 reports the scroll event under Events. You can see it in Realtime reports immediately and in standard reports within 24-48 hours.

The limitation: Enhanced Measurement tracks only the 90% threshold. You get a binary answer — did the user scroll to near the bottom, or not? There's no data for 25%, 50%, or 75%. For content-heavy pages like blog posts, landing pages, or product detail pages, this single data point isn't granular enough to understand reading patterns.

When should I use custom scroll triggers instead of Enhanced Measurement?

Enhanced Measurement's 90% threshold is sufficient for basic engagement tracking — knowing whether users reach the bottom of the page. But several scenarios demand more granularity:

If any of these apply, set up custom scroll depth triggers in GTM alongside (or instead of) Enhanced Measurement.

How do I create a custom Scroll Depth trigger in GTM?

First, enable the built-in scroll variables. Go to Variables in your GTM workspace, click Configure, and check these under "Scrolling":

Now create the trigger:

  1. Go to TriggersNew
  2. Choose trigger type: Scroll Depth
  3. Check Vertical Scroll Depths
  4. Select Percentages and enter: 25, 50, 75, 90
  5. Under "This trigger fires on," select All Pages (or add conditions for specific pages)
  6. Name it descriptively: "Scroll Depth - 25/50/75/90 - All Pages"
  7. Save

Important: By default, each threshold fires only once per page load. If a user scrolls down to 50%, scrolls back up, and then scrolls to 50% again, the 50% trigger fires only the first time. This "once per page" behavior prevents duplicate events and is the correct setting for analytics.

GTM Event Helper creates scroll depth triggers through the GTM API — select the thresholds you want, and the trigger and tag are configured automatically with correct naming conventions.

How do I create a GA4 Event tag for scroll tracking?

With your scroll trigger ready, create the tag that sends data to GA4:

  1. Go to TagsNew
  2. Tag type: Google Analytics: GA4 Event
  3. Select your GA4 Configuration tag (or enter the Measurement ID directly)
  4. Event Name: scroll_depth
  5. Add event parameters:
    • scroll_threshold{{Scroll Depth Threshold}}
    • page_path{{Page Path}}
  6. Attach the scroll depth trigger you created
  7. Name it: "GA4 - Scroll Depth"
  8. Save

Why use scroll_depth instead of scroll? The scroll event name is already used by GA4 Enhanced Measurement. Using a different name avoids conflicts and makes it easy to distinguish your custom scroll events from the built-in ones in reports. If you prefer to replace Enhanced Measurement entirely, disable the Scrolls toggle in your data stream and use scroll as your custom event name.

Event Parameter Registration

For scroll_threshold to appear as a dimension in GA4 reports, you need to register it as a custom dimension:

  1. GA4 Admin → Custom definitions → Custom dimensions
  2. Click Create custom dimension
  3. Dimension name: "Scroll Threshold"
  4. Scope: Event
  5. Event parameter: scroll_threshold

Without this registration, the data is collected but won't be available for reporting breakdowns. GA4 allows up to 50 custom event-scoped dimensions per property.

What scroll percentages should I track?

The right thresholds depend on your page type and what decisions you're making with the data:

Standard content pages (blog posts, articles): Use 25, 50, 75, 90. This four-point breakdown tells you whether visitors read the introduction (25%), reach the middle (50%), get through most of the content (75%), and finish the article (90%). The 25% threshold is especially valuable — a sharp drop from pageview to 25% indicates your above-the-fold content isn't compelling enough to keep scrolling.

Long-form content (guides, whitepapers, case studies): Consider 10, 25, 50, 75, 90. The extra 10% threshold helps you understand whether visitors immediately bounce after loading the page versus engaging even slightly with the content.

Landing pages: Use thresholds that correspond to your page sections. If your hero takes up 20% of the page, features are at 40%, testimonials at 60%, pricing at 80%, and the CTA is at 90%, track those exact percentages: 20, 40, 60, 80, 90.

Short pages (contact, pricing, sign-up): 50, 90 is often sufficient. Short pages don't need granular tracking — you mainly want to know if users saw the full page.

Performance consideration: Each threshold adds a small amount of event processing. Ten thresholds (every 10%) across a high-traffic site can noticeably increase your GA4 event volume. For most sites, four to five thresholds provide enough resolution without inflating event counts.

How do I track scroll depth on specific pages only?

Tracking scroll depth on every page creates noise. A "Contact Us" page with three form fields doesn't need the same scroll tracking as a 3,000-word guide. GTM lets you restrict your scroll trigger to specific pages using firing conditions.

Method 1: Page Path condition on the trigger

When creating or editing your scroll depth trigger:

  1. Under "This trigger fires on," select Some Pages
  2. Add a condition: Page Pathcontains/blog/

This fires only on pages where the URL path includes "/blog/". You can also use:

Method 2: Trigger Groups

If you want different thresholds for different page types, create separate triggers:

Trigger 1: "Scroll Depth - Blog - 25/50/75/90"
  Thresholds: 25, 50, 75, 90
  Condition: Page Path contains /blog/

Trigger 2: "Scroll Depth - Landing Pages - 20/40/60/80/90"
  Thresholds: 20, 40, 60, 80, 90
  Condition: Page Path matches RegEx ^/(features|pricing|demo)$

Attach both triggers to the same GA4 Event tag. The tag fires whenever either trigger activates, and the {{Scroll Depth Threshold}} variable captures the correct value regardless of which trigger fired.

Method 3: Lookup Table variable

For advanced setups where you want to dynamically control whether scroll tracking is active, create a Lookup Table variable that maps page paths to "true" or "false," then use it as a trigger condition. This centralizes your page-level logic in one variable instead of spreading it across multiple triggers.

How do I analyze scroll data in GA4?

Once scroll depth events start flowing into GA4, you need to structure your analysis to get actionable insights.

Explorations: Free-form report

  1. Go to ExploreFree form
  2. Rows: add Page path and Scroll Threshold (custom dimension)
  3. Values: add Event count
  4. Filter: Event name equals scroll_depth

This produces a table showing how many times each scroll threshold was reached on each page. To calculate a scroll completion rate, compare the event count at 90% to the event count at 25% for the same page.

Funnel exploration

Create a funnel with scroll thresholds as steps:

  1. Step 1: scroll_depth event where scroll_threshold = 25
  2. Step 2: scroll_depth event where scroll_threshold = 50
  3. Step 3: scroll_depth event where scroll_threshold = 75
  4. Step 4: scroll_depth event where scroll_threshold = 90

This visualization shows exactly where users drop off. A typical healthy content page might show: 100% → 70% → 50% → 35%. If you see 100% → 30% → 25% → 20%, the content loses readers immediately after the first quarter.

Segmentation

Combine scroll data with other dimensions for deeper insights:

How do I track scroll depth for individual page sections?

Percentage-based tracking has a fundamental limitation: the same percentage means different content on pages of different lengths. On a 1,000-pixel page, 50% is 500 pixels. On a 5,000-pixel page, 50% is 2,500 pixels. If you need to know whether a user saw a specific section — not just a generic percentage — you need section-level tracking.

Element Visibility trigger approach

GTM's Element Visibility trigger fires when a specific element enters the viewport. This is more precise than scroll depth for tracking sections:

  1. Add id attributes to your page sections: <section id="pricing">, <section id="testimonials">
  2. Create an Element Visibility trigger:
    • Selection Method: ID
    • Element ID: pricing
    • When to fire: Once per page
    • Minimum percent visible: 50 (fires when at least half the element is visible)
  3. Create a GA4 Event tag with event name section_view and a parameter section_id set to the element ID

Pixel-based scroll tracking

If you can't add IDs to page sections, pixel-based scroll thresholds offer a middle ground. Calculate the pixel position of each section and use those values as scroll depth thresholds:

Trigger: Scroll Depth
Units: Pixels
Thresholds: 600, 1400, 2200, 3000

The downside: pixel values break when page content changes length. Element Visibility is more maintainable for section tracking.

GTM Event Helper supports Element Visibility triggers — pick the section on your page, and the extension creates the trigger and GA4 tag through the API with the correct element selector.

What are common scroll tracking mistakes?

Scroll depth tracking seems simple, but several implementation issues can silently corrupt your data.

1. Not disabling Enhanced Measurement scroll. If you create custom scroll triggers in GTM while Enhanced Measurement's Scrolls toggle is on, you'll get both events — the built-in scroll event at 90% and your custom scroll_depth event at the same threshold. This double-counts 90% scrolls. Either disable Enhanced Measurement scrolls or use a different event name and accept the overlap.

2. Tracking scroll on pages with auto-expanding content. Infinite scroll pages, lazy-loaded content, and "Load More" buttons change the page height after initial load. A user might reach 90% of the initial page, triggering the event, and then the page grows. The 90% threshold fires again when they reach 90% of the new height — resulting in duplicate events. Use the "Once per page" firing option and consider Element Visibility triggers for infinite scroll pages.

3. Ignoring tab visibility. Users who open a page, scroll down, and then switch to another tab still register scroll events when they come back. This is expected behavior, but be aware that time-on-page and scroll depth can be disconnected — a user might scroll to 90% in five seconds if they're skimming, while another takes five minutes reading every word.

4. Not accounting for page load position. Pages with anchor links (e.g., /faq#returns) or pages restored from browser history might load with the viewport already below 0%. GTM fires scroll depth thresholds that are already met on page load. This isn't a bug — it's accurate behavior — but it means some "scroll" events don't represent actual scrolling.

5. Too many thresholds on high-traffic sites. Tracking every 5% (twenty thresholds) on a site with 1M monthly pageviews generates up to 20M additional scroll events per month. GA4's free tier has a 25M event limit per month. Four or five thresholds per page provide actionable granularity without approaching event limits.

6. Forgetting to register custom dimensions. The data arrives in GA4, but scroll_threshold doesn't appear in reports because you haven't registered it as a custom dimension. This is the most common support question for scroll tracking. Register your custom parameters immediately after creating the tag — don't wait until you check reports days later.

Is there a faster way to set up scroll tracking?

The manual workflow involves enabling variables, configuring triggers, creating tags, registering dimensions, and testing in Tag Assistant. For a single trigger-tag pair, it takes about 15 minutes. For page-specific setups with multiple trigger groups, it can take an hour or more.

GTM Event Helper streamlines this process:

  1. Select the scroll event type in the extension
  2. Choose your thresholds and page conditions
  3. The extension creates the trigger and GA4 Event tag via the GTM API
  4. Built-in variables are enabled automatically

For Element Visibility-based section tracking, click the section element on the page — the extension generates the appropriate trigger with the correct element selector, firing conditions, and a matching GA4 tag.

Track scroll engagement without the manual setup.

Install GTM Event Helper

External Resources

Related Articles

← All articles · Home · Privacy Policy · Contact