Sub topic 1
What enhanced measurement is and which events it covers
Enhanced measurement is a group of settings on a GA4 web data stream. When you switch them on, the Google tag records common interactions such as scrolls, outbound clicks, site searches, video plays, file downloads and form activity. You don't write any tracking code for them. This chapter covers what the feature is, how it works, which events it produces, and what each event carries. Later chapters go through each event in detail.
Prerequisites
This chapter assumes you have the following:
- A GA4 property with a web data stream and the Google tag installed, either as gtag.js on the page or through Google Tag Manager.
- A working picture of the GA4 event model: an event has a name, and it can carry parameters, which are named values that describe the event.
- Access to the GA4 Admin interface, with at least the Editor role on the property or account to change stream settings.
- Basic HTML and JavaScript, enough to read the short examples.
The idea in one paragraph
GA4 is event-based, so every measured interaction is an event. Some events come from the tag with no setup, such as session_start and first_visit. Others describe behavior that nearly every website cares about, and the tag can detect them from the page itself. GA4 groups that second set under the name enhanced measurement. Each event in the group has a toggle on the data stream. The tag reads the settings when it loads, listens for the matching browser behavior, and sends the event with a standard set of parameters.
How it works
Enhanced measurement runs inside the Google tag in the visitor's browser. The tag fetches the stream's configuration, so a change in Admin takes effect without editing your site. With gtag.js the configuration comes from the config call for your measurement ID. With Google Tag Manager it comes from the Google tag that holds the same ID.
Three consequences follow from this design:
- The tag only detects what the browser exposes. It can see a click on a link, but it can't know what that click means for your business.
- The settings belong to the data stream, not to the property. If you have two web streams, each has its own toggles.
- Because detection is automatic, it is generic. Event names and parameters are fixed, and you can't rename them.
Where the settings live
In Admin, open Data collection and modification, then Data streams, and choose a web stream. The Enhanced measurement section has a master switch and a gear icon. The gear opens the individual toggles, and a few of them have extra options, such as the query parameters for site search.
Menu labels move occasionally, so check them against your own interface. Turning the master switch off disables every enhanced event for that stream. Turning off one toggle disables only that event.
Which events it covers
The table lists the events that enhanced measurement produces and the main parameters each sends. Parameters that appear on every event, such as page_location and page_title, are omitted.
| Setting in the stream | Event name | Fires when | Main parameters |
|---|---|---|---|
| Page views | `page_view` | A page loads, or the browser history changes if that option is on | `page_location`, `page_referrer`, `page_title` |
| Scrolls | `scroll` | The visitor first reaches 90% of page depth | `percent_scrolled` |
| Outbound clicks | `click` | A click on a link to a different domain | `link_classes`, `link_domain`, `link_id`, `link_url`, `outbound` |
| Site search | `view_search_results` | A URL contains a search query parameter | `search_term`, plus any extra query parameters you list |
| Video engagement | `video_start`, `video_progress`, `video_complete` | An embedded YouTube video plays, passes 10%, 25%, 50% and 75%, or finishes | `video_current_time`, `video_duration`, `video_percent`, `video_provider`, `video_title`, `video_url`, `visible` |
| File downloads | `file_download` | A click on a link to a recognized file type | `file_extension`, `file_name`, `link_text`, `link_url`, `link_classes`, `link_id` |
| Form interactions | `form_start`, `form_submit` | A visitor first interacts with a form, or submits it | `form_id`, `form_name`, `form_destination`, `form_length`, `form_submit_text` |
Parameter lists can change as Google updates the feature, so confirm against the current Google documentation or DebugView before building reports on a specific parameter.
What each event records
Page views
page_view is the baseline event. It records the page URL, the title and the referrer. You can also enable detection of browser history changes. Single-page sites change the URL without a full page load, and without that option the tag would report only the first page. A later chapter covers this case.
Scrolls
The scroll event fires once per page, when the visitor reaches 90% of the page's vertical depth. It carries percent_scrolled with the value 90. It doesn't tell you about 25%, 50% or 75%. If you need finer steps, add a custom event. This example uses a different event name, scroll_depth, so it doesn't collide with the built-in scroll event.
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((t) => {
if (percent >= t && !fired.has(t)) {
fired.add(t);
gtag('event', 'scroll_depth', { percent_scrolled: t });
}
});
}, { passive: true });Outbound clicks
A click on a link whose domain differs from the current site sends a click event with outbound set to true. Domains you have configured for cross-domain measurement count as internal, so they don't produce outbound clicks. The name click is easy to misread. It does not mean every click on the page. It means outbound link clicks only.
Site search
When a page URL contains a search query parameter, the tag sends view_search_results with the value as search_term. By default GA4 looks for parameters named q, s, search, query and keyword. You can replace this list with the parameters your site uses, and you can add extra parameters to capture, such as a category filter.
Video engagement
For embedded YouTube players, the tag sends video_start when playback begins, video_progress at 10%, 25%, 50% and 75%, and video_complete at the end. Detection depends on the player's JavaScript API being enabled. The embed URL must include enablejsapi=1:
<iframe
width="560" height="315"
src="https://www.youtube.com/embed/VIDEO_ID?enablejsapi=1"
title="Product walkthrough"
allowfullscreen></iframe>Without that parameter, no video events are sent. Videos from other providers, or files played in a <video> element, are not covered.
File downloads
A click on a link to a file with a recognized extension sends file_download. The default list includes common document, archive, audio and video types such as pdf, xlsx, docx, zip, mp3 and mp4. The event carries file_name, file_extension and link_url. It detects the click on the link, not a completed transfer, so a broken file link still counts.
Form interactions
form_start fires the first time a visitor interacts with a form field during a session. form_submit fires when the form is submitted. The tag reads attributes such as the form's id and name, so forms without them report empty values. Forms that submit through custom JavaScript or load inside an iframe are often missed.
Verifying the setup
You can check what the tag sends by turning on debug mode. This is the standard gtag snippet with debug_mode added. Events from that browser then appear in DebugView, in the Admin area under Data display:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX', { debug_mode: true });
</script>Replace G-XXXXXXXXXX with your measurement ID, and remove debug_mode when you finish testing. The page must contain the script tags themselves, so in a plain .js file you would drop the <script> wrapper lines and keep only the window.dataLayer and gtag lines.
Common misunderstandings
- Enhanced measurement is not retroactive. An event is recorded only from the moment its toggle is on. Turning it on later does not create past data.
- A toggle being on does not guarantee the event fires. The page must meet the event's conditions, such as the
enablejsapi=1parameter for YouTube. - Enhanced events don't automatically show up as custom dimensions or key events. You have to register parameters and mark events yourself. A later chapter covers this.
- Duplicates can happen. If you also create the same event with custom code or a Tag Manager tag, GA4 receives both. Decide which one owns each interaction.
- Event names and parameters are fixed. If you need different names or finer behavior, use a custom event, as in the
scroll_depthexample above.
Summary of the working model
- Enhanced measurement is configured per web data stream and executed by the Google tag in the browser.
- It covers page views, scrolls, outbound clicks, site search, YouTube video engagement, file downloads and form interactions.
- Each event has a fixed name and a standard set of parameters.
- It is a fast starting point, not a complete tracking plan, and some events need extra setup or custom code.
Exercise
A site owner turned on enhanced measurement and embedded a YouTube video with the URL https://www.youtube.com/embed/VIDEOID. The scroll and `filedownload` events appear in DebugView, but no video events do. What is the most likely cause, and what is the fix?
Show answer
The embed URL does not include enablejsapi=1, so the tag can't read the player's state through the YouTube JavaScript API. Change the URL to https://www.youtube.com/embed/VIDEOID?enablejsapi=1, reload the page, and play the video again with DebugView open to confirm that `videostart, videoprogress and videocomplete` arrive.
Exercise
Your team wants to know how many visitors reach 25% and 50% of an article. Enhanced measurement is already on. Can you get this from the built-in scroll event, and if not, what should you do?
Show answer
No. The built-in scroll event fires only at 90% depth, with percent_scrolled set to 90. Add a custom event under a different name, such as scroll_depth, that fires at 25% and 50% and sends the threshold as a parameter. A different name avoids duplicating or mixing data with the built-in scroll event.