Sub topic 12
Limitations, duplicate events and common pitfalls
This chapter assumes you have a GA4 web data stream with the Google tag installed (gtag.js or Google Tag Manager). It also assumes you know how events and parameters work, and that you can open the Admin interface and DebugView. The goal is to help you spot where enhanced measurement gives wrong or missing numbers, and to fix it.
What enhanced measurement cannot see
Enhanced measurement is a set of listeners that the Google tag attaches to the page. It records only what those listeners can observe. That leaves several gaps:
- Internal link clicks. The built-in
clickevent covers outbound links only. Clicks on links within your own domain are not collected. - Scroll below 90%. The
scrollevent fires once per page, when the user reaches 90% of the page height. You get no 25%, 50% or 75% data. - Other video players. Only embedded YouTube players are tracked, and only when the embed URL includes
enablejsapi=1. Vimeo, self-hosted<video>tags and wrapped players produce nothing. - Content in cross-origin iframes. The tag cannot see inside an iframe from another origin. A form embedded from a third-party service will not produce
form_startorform_submiton your property. - Forms that never submit natively. The tag listens for the browser's form submit behavior. A form that sends data with JavaScript and never triggers a normal submit may not produce
form_submit. - Files outside the recognized list. Downloads are detected by file extension. An extension that is not on the list, such as
.epub, is not recorded. A download served from a URL with no extension, such as/download?id=42, is also not recorded. - Visitors who block or decline measurement. Ad blockers, browsers that block the Google tag, and users who decline consent remove their events from every report, enhanced or not.
None of this is a bug. The feature is meant to cover common cases without code. Once your questions go beyond those cases, you need custom events.
Settings apply only going forward
Enhanced measurement settings belong to the web data stream. Three consequences follow:
- A change applies to new hits only. Data already collected is never reprocessed.
- If you turn an event off, the history stays in reports, but the event stops arriving.
- The settings affect every page that uses that stream's measurement ID. You cannot turn
scrolloff for only one section of the site from the stream settings.
Write down the date of every settings change. Without that note, a sudden drop or jump in file_download counts is hard to explain later.
Duplicate events
Duplicates are the most common problem. They happen when two mechanisms report the same interaction.
Enhanced measurement plus your own tag
You turn on Scrolls, and a colleague adds a GTM trigger that sends an event named scroll at 50%. Both arrive under the name scroll. Reports mix the 90% hits with the 50% hits, and the counts no longer mean anything.
The fix is to give custom events different names, such as scroll_depth, or to turn off the enhanced setting. Do not leave both running under the same name.
The same applies to click, file_download, form_start, form_submit, video_start, video_progress, video_complete and view_search_results.
Two Google tags with the same measurement ID
If the page loads gtag.js directly and also loads a GTM container that contains a GA4 configuration for the same G- ID, every event is sent twice. Enhanced events are doubled as well.
Check this first when all your events show doubled counts, not only one event. In DebugView, each event appears twice with nearly the same timestamp.
Page views counted twice in single-page sites
Page changes based on browser history events makes the tag send a page_view each time the site calls history.pushState or history.replaceState. If your developers also send page_view from the router, each navigation is counted twice.
Pick one method. If you want full control, turn off the history-based setting and send the page view yourself.
// Load the Google tag first, then run this.
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
// Suppress the automatic initial page_view; we send it ourselves below.
gtag('config', 'G-XXXXXXXXXX', { send_page_view: false });
function sendPageView() {
gtag('event', 'page_view', {
page_location: location.href,
page_title: document.title
});
}
// Initial load
sendPageView();
// Route changes through the History API
['pushState', 'replaceState'].forEach((method) => {
const original = history[method];
history[method] = function (...args) {
const result = original.apply(this, args);
sendPageView();
return result;
};
});
// Back and forward buttons
window.addEventListener('popstate', sendPageView);For this code to give correct counts, Page changes based on browser history events must be off in the stream settings. Otherwise every route change is counted twice again.
A related problem is a framework that updates the URL before it updates document.title. The page_view then carries the previous page's title. If you see this, send the event after the route has rendered, for example in the router's "navigation complete" hook, instead of wrapping pushState.
Redirects, reloads and double submits
Not every duplicate is a tagging error. A user who reloads a page produces a second page_view. A user who clicks a submit button twice may produce two form_submit events. A redirect chain can load the tag twice. Compare timestamps and the page_location values before you blame the setup.
Diagnosing a suspected duplicate
Work through the questions in order, and confirm each guess in DebugView or Tag Assistant before you change anything. In the browser's Network tab, filter requests for collect. The en parameter in each request holds the event name. Two requests with the same en value and the same timing point to a double tag. Open Tag Assistant's preview and look for two tags firing on one trigger.
Pitfalls by event
| Event | Common pitfall | What to do |
|---|---|---|
| `page_view` | Doubled in single-page sites when both history events and manual tags are active | Use one method only |
| `scroll` | Never fires on pages shorter than the window, because no scrolling is possible | Treat missing `scroll` as "page too short" before assuming a bug |
| `click` | Not collected for internal links; subdomains may be treated as outbound depending on cross-domain setup | Review the domains in your cross-domain settings; use custom events for internal links |
| `view_search_results` | Fires only if the URL contains a configured query parameter | Check the parameter names in the stream settings against your real search URLs |
| `video_*` | No events if `enablejsapi=1` is missing, or if the iframe is added after the page loads in a way the tag does not detect | Add the parameter to the embed URL; test with a freshly loaded page |
| `file_download` | Extension must be on the recognized list | Add a custom event for other extensions |
| `form_start`, `form_submit` | Misfires on forms that validate in JavaScript, and nothing for cross-origin iframes | Compare against actual submissions in your backend |
Reporting pitfalls
Enhanced events appear in the Events report as soon as they arrive. Their parameters do not appear in standard reports until you register them as custom dimensions. If you open a report to break file_download down by file_extension and nothing is there, the cause is almost always a missing registration. Registered dimensions fill in only from the registration date onward, not for past events.
Two more points:
- Marking an event as a key event counts every occurrence. A
form_submitkey event counts each submission the tag detects, including failed or invalid ones, because the browser still fires the submit. - If you turn the key event flag on for a duplicated event, you also count the duplicates. Fix duplicates before you build conversion reports on them.
A short validation routine
Run this after any change to the site or the stream settings:
- Open the page with
debug_modeon, or use Tag Assistant preview. - Perform each interaction once: scroll to the bottom, click an outbound link, search, play a YouTube video, download a PDF, start and submit a form.
- In DebugView, confirm that each interaction produced exactly one event with the expected parameters.
- Repeat on one page that uses your single-page navigation, and count
page_viewevents for three route changes. There should be three, not six. - Repeat in a clean browser profile without extensions to rule out blockers.
Deciding when to leave enhanced measurement
Keep a setting on when it answers your question and its limits do not hurt you. Replace or add to it when:
- you need more scroll thresholds, or a different threshold than 90%;
- you need clean names and only the parameters you want on link clicks;
- your videos are not YouTube embeds, or your forms use JavaScript submission;
- you need a duplicate-free count for a key event.
The next chapter covers custom event alternatives in more detail.
Exercise
A single-page site shows twice as many page_view events as expected, but scroll and file_download counts look normal. The developers send page_view from the router on every route change. What is the most likely cause, and what are two ways to fix it?
Show answer
The stream setting "Page changes based on browser history events" is on, so the Google tag sends a page_view on each history change, and the router sends a second one. Because only page_view is doubled, a second tag with the same measurement ID is unlikely. Fix it either by turning off the history-based setting and keeping the manual events, or by removing the router's manual page_view and relying on the enhanced setting.
Exercise
Your team adds a GTM tag that sends an event named scroll when users reach 50% of a page, while enhanced measurement Scrolls stays on. What goes wrong, and what should you change?
Show answer
Both mechanisms send events named scroll, so reports mix 50% and 90% hits and the counts cannot be interpreted. Rename the custom event, for example to scroll_depth with a percent_scrolled parameter, or turn off the enhanced Scrolls setting and handle all thresholds yourself.