Sub topic 8
Review enhanced measurement settings
Enhanced measurement is a stream-level setting that makes the Google tag record common interactions without any extra code. This chapter covers what it collects, where to configure it, and how to check it after installation. It also covers the ways it can inflate or hide data.
This chapter assumes you have already:
- Created a GA4 property and a web data stream.
- Installed the Google tag by one of the three routes (manual, platform integration, or Google Tag Manager).
- Seen at least one
page_viewin the Realtime report.
What enhanced measurement is
A basic installation collects page_view and a few automatic events such as session_start and first_visit. Enhanced measurement adds events for interactions that most sites want to track: scrolling, outbound links, downloads, site search, video, and forms.
It is a property of the web data stream, not of the page or the tag snippet. You change it once in the GA4 interface. The Google tag on your site reads the stream's configuration and starts or stops sending those events. This works the same whether the tag was pasted by hand, added by a plugin, or deployed through Google Tag Manager. It is also why a settings change needs no code deploy.
Enhanced measurement is on by default for new web streams. Reviewing it therefore means checking what is already running, not switching features on.
Where to find the settings
- Open Admin.
- Under Data collection and modification, choose Data streams.
- Select your web stream.
- In the Enhanced measurement section, check that the switch is on. Select the gear icon to see the individual toggles.
The interface changes from time to time, so labels may differ slightly from this list. The events and parameters below are stable.
What each toggle collects
| Toggle | Event name | When it fires | Notable parameters |
|---|---|---|---|
| Page views | `page_view` | On page load, and on history changes if the advanced option is on | `page_location`, `page_referrer` |
| Scrolls | `scroll` | The first time a user reaches 90% of page depth | `percent_scrolled` |
| Outbound clicks | `click` | A click on a link to a domain other than yours | `link_url`, `link_domain`, `outbound` |
| Site search | `view_search_results` | A page URL contains a search query parameter | `search_term` |
| Video engagement | `video_start`, `video_progress`, `video_complete` | Playback of embedded YouTube videos, with progress at 10%, 25%, 50% and 75% | `video_title`, `video_url`, `video_percent` |
| File downloads | `file_download` | A click on a link to a common file type | `file_name`, `file_extension`, `link_url` |
| Form interactions | `form_start`, `form_submit` | First interaction with a form, and a form submission | `form_id`, `form_name`, `form_destination` |
Page views and history changes
page_view is the foundation of nearly every report. Under the page views gear menu there is an advanced option, Page changes based on browser history events. When it is on, the tag sends a page_view each time the page URL changes through the browser History API, without a full reload.
Single-page applications built with React, Vue, or Angular use that API for navigation. For those sites you usually want the option on. For a conventional multi-page site it does nothing harmful. Some sites with unusual URL handling, such as many hash fragment changes, can see extra page views from it, so check the counts after enabling it.
Scrolls
The scroll event fires once per page view, at 90% depth. It is a yes-or-no signal that a visitor read most of the page, not a measure of reading progress. If you need 25%, 50% and 75% marks, you must build them as custom events.
Outbound clicks
A click on a link whose domain differs from the current site sends a click event with outbound set to true. The tag treats every domain listed in your cross-domain configuration as internal. If your checkout lives on a second domain you own, add it under Configure your domains in the tag settings. Otherwise, every checkout click is recorded as outbound and the session may split across domains.
Site search
The tag looks for a query parameter in the URL. The defaults are q, s, search, query and keyword. If your search results page uses another name, such as ?term=shoes, add term in the site search settings. You can also list parameters to strip from page_location.
A site whose search runs entirely in JavaScript and never changes the URL produces no view_search_results events.
Video engagement
Video events work for embedded YouTube players only, and only when the embed URL contains enablejsapi=1. Vimeo, self-hosted video, and other players need custom instrumentation. If you embed through a platform widget that omits the JS API parameter, the toggle looks on but no events arrive.
File downloads
The tag matches the link's file extension against a default list. This includes pdf, doc(x), xls(x), ppt(x), csv, txt, zip, rar, gz, exe, mp3, mp4 and other common types. A link that points to a script, such as /download.php?id=7, has no matching extension and is not counted. A download triggered by JavaScript, with no link click, is not counted either.
Form interactions
form_start fires the first time a user interacts with a form in a session. form_submit fires when the form is submitted. Forms that submit through AJAX or that replace themselves without a real submit event are often missed or recorded inconsistently. Treat these events as a rough signal and test every form that matters to you.
Audit your own pages before trusting the numbers
Toggles only matter if your pages contain what they detect. This snippet, run in the browser console on a page, lists the links that would count as outbound clicks or downloads. It uses the default extension list and does not know about your cross-domain settings.
const own = location.hostname;
const fileRe = /\.(pdf|docx?|xlsx?|pptx?|pps|csv|txt|rtf|zip|rar|7z|gz|pkg|exe|key|mp3|mp4|mov|avi|mpeg|wmv|wav|wma|midi)$/i;
const links = [...document.querySelectorAll('a[href]')];
const outbound = links.filter(a => a.hostname && a.hostname !== own);
const downloads = links.filter(a => fileRe.test(a.pathname));
console.log('Outbound links:', outbound.map(a => a.href));
console.log('Download links:', downloads.map(a => a.href));If a link you expect to be a download is missing from the second list, GA4 will not record it as one.
Interactions with other setup choices
Double counting with custom code
The most common enhanced measurement problem is duplication. You or a previous developer may already track the same interaction with a Google Tag Manager trigger, a plugin, or hand-written gtag('event', ...) calls. When the stream toggle is also on, each interaction is reported twice.
The usual cases are:
- A GTM scroll trigger plus the
scrollevent. - A plugin that sends
file_downloadwhile the toggle is on. - Custom
page_viewcalls in a single-page app while the history option is on. - A manual
outbound_clickevent next to the built-inclickevent.
Duplicate events carry different names or different tag instances, so GA4 does not merge them. Pick one source for each interaction. Either turn the toggle off and keep your custom tracking, or remove the custom tracking and rely on the toggle. Use the toggle when its behavior matches your needs, because it requires less maintenance.
Consent
Enhanced measurement events obey the same consent state as the rest of the tag. If analytics_storage is denied, these events are subject to the same restrictions as other events. A drop in scroll or download counts after you add a consent banner is expected, not a bug in the toggles.
Key events and reporting
Enhanced measurement events appear in the Events report and can be marked as key events. For example, you could mark file_download as a key event for a whitepaper download. Without a specific condition, though, every download of any file counts. If you only care about one file, create a modified event or a custom event that filters on file_name. Mark that as the key event instead.
Event parameters in reports
Parameters such as link_url and file_name arrive with the events, but they do not appear as dimensions in standard reports until you register them as custom dimensions. That affects what you can break down in Explorations. Some parameters, such as search_term, file_name and link_url, already have built-in dimensions. For others, register them yourself.
Verify the settings work
- Turn on debugging, either with
debug_modein the config call or with Tag Assistant. - Open Admin, then DebugView.
- Perform each interaction on a real page: scroll to the bottom, click an external link, click a PDF link, run a site search, play a YouTube video, and submit a form.
- Confirm that each event appears once, with the parameters you expect.
- Check the Realtime report for the same events from a non-debug visit.
A toggle change can take a short time to reach the page, and pages cached by a CDN may serve the same tag configuration, so test in a fresh browser session.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Page views roughly double on a single-page app | Manual `page_view` calls plus the history change option | Remove the manual calls or turn off the option |
| No `view_search_results` | Search parameter not in the default list, or search does not change the URL | Add your parameter name in site search settings |
| No video events | Embed lacks `enablejsapi=1`, or the player is not YouTube | Fix the embed, or build custom events |
| Internal checkout clicks appear as outbound | Second domain not configured | Add it to the configured domains |
| Downloads missing | Link has no file extension or is script-driven | Use a direct file URL, or send a custom event |
| Form events inconsistent | AJAX form or custom submit handling | Use a custom event on the success state |
Exercise
Your site is a single-page app. After you enable the "Page changes based on browser history events" option, page views double. Developers say their router code calls gtag('event', 'page_view') on every route change. What are two valid fixes, and how would you confirm the fix worked?
Show answer
Either remove the router's manual pageview calls and let enhanced measurement send them, or turn off the history change option and keep the manual calls. Choose one source of page views. To confirm, open DebugView with debug mode on, navigate through several routes, and check that each navigation produces exactly one pageview event with the correct page_location.
Exercise
Marketing reports that file_download events never appear for the "Download brochure" button. The button's link is /get?file=brochure and the server sends the PDF in response. Why does enhanced measurement miss it, and what could you do?
Show answer
The tag decides by the file extension in the link URL, and /get?file=brochure has no recognized extension, so no file_download is sent. Options are to link directly to the PDF (for example /files/brochure.pdf), or to send a custom event with gtag('event', ...) or a Tag Manager trigger when the button is clicked. If you add a custom event, do not leave a second source of the same interaction enabled.