Sub topic 4
The scroll event and the 90% threshold
What the scroll event records
Prerequisites: you should have a GA4 property, a web data stream, the Google tag installed, and a basic understanding of GA4 events and parameters.
Enhanced measurement can send a scroll event without custom JavaScript. GA4 sends it when a visitor reaches about 90% of the page's vertical depth. The event normally includes percent_scrolled with the value 90.
The threshold means 90% of the page's scrollable distance, not 90% of the browser window. For example, if a page has 2,000 pixels of scrollable content, the event is triggered when the visitor has scrolled about 1,800 pixels.
| Event | Trigger | Parameter |
|---|---|---|
| `scroll` | Visitor reaches 90% vertical depth | `percent_scrolled: 90` |
The event does not report every scroll movement or every percentage reached. In ordinary page-load tracking, expect one scroll event after the visitor crosses the threshold.
Enable or disable the setting
Open the GA4 Admin area and follow these steps:
- Select Data streams under the property.
- Select the web data stream for your site.
- Open Enhanced measurement settings.
- Select the settings icon.
- Turn Scrolls on or off.
- Save the change if GA4 asks you to confirm it.
Scroll tracking is usually enabled by default. Disable it when your site already sends its own scroll events and you want to avoid duplicate or confusing data.
The built-in event is useful for a simple question: “Did visitors reach most of this page?” It cannot distinguish 25%, 50%, and 75% readers. It also does not tell you which section of a long page was visible.
Verify the event
Use Tag Assistant preview or GA4 DebugView while testing. Open a page that is long enough to scroll, start the preview session, and scroll close to the bottom. Look for the scroll event and inspect its parameters.
If the event does not appear, check these points:
- The correct web data stream is receiving the page.
- The Google tag loads successfully.
- Enhanced measurement is enabled for that stream.
- You crossed the page's 90% vertical depth rather than only scrolling within a nested element.
- Your browser's extensions or consent settings are not preventing analytics collection.
- You are testing the same property and stream shown in DebugView.
DebugView can show the event quickly, but normal reports may take longer to process. Do not use the event's immediate appearance in a standard report as your only test.
When the 90% threshold is too limited
A content site may need to compare readers who reach 25%, 50%, and 75%. In that case, supplement enhanced measurement with a custom event. Use a different event name, such as scroll_depth, rather than sending another event named scroll.
const thresholds = [25, 50, 75];
const fired = new Set();
window.addEventListener('scroll', () => {
const doc = document.documentElement;
const scrollable = doc.scrollHeight - doc.clientHeight;
if (scrollable <= 0) return;
const percent = (window.scrollY / scrollable) * 100;
thresholds.forEach((threshold) => {
if (percent >= threshold && !fired.has(threshold)) {
fired.add(threshold);
gtag('event', 'scroll_depth', {
percent_scrolled: threshold
});
}
});
}, { passive: true });This example assumes that gtag is already available from your Google tag. The Set prevents repeated events for the same threshold during one page view.
Register percent_scrolled as an event-scoped custom dimension if you need to use the custom parameter in reports. You can then compare how many visitors reached each threshold.
Exercise
A visitor scrolls to 60%, leaves the page, and returns later without refreshing it. Should enhanced measurement send a scroll event at 60%?
Show answer
No. The built-in scroll event is designed for the 90% threshold. It does not report a 60% event. Use a separate custom event if intermediate depth matters.