Sub topic 3
Review enhanced measurement settings
This chapter assumes you have a GA4 property, a web data stream with a Measurement ID, and a Google tag that already loads on your site. You should be able to edit your site's HTML or platform settings and know what events and sessions are.
Review enhanced measurement settings
Enhanced measurement is a set of automatic event options on a web data stream. Open Admin, then Data streams, select your stream, and open Enhanced measurement. Page views, scrolls, outbound clicks, site search, video engagement, and file downloads can each be switched on or off. These events need no extra code, so turn off any option that duplicates events your own code already sends.
Verify with Realtime, Tag Assistant, and DebugView
- Realtime report: shows events from the last 30 minutes.
- Tag Assistant: lists the Google tags on a page and their status.
- DebugView: shows event detail for traffic flagged as debug. Enable it with the GA Debugger extension or with
debug_mode.
gtag('config', 'G-XXXXXXXXXX', {
debug_mode: true
});Avoid duplicate tags and double counting
A tag that loads twice counts every page view twice. Check the page source for two gtag.js script lines, and check Tag Assistant for more than one Google tag. The usual cause is a snippet pasted into the site while a platform plugin or Google Tag Manager container also loads the tag. Keep one installation route per property.
Set consent defaults before the tag sends data
Where privacy rules apply, set a default consent state before the tag loads. This snippet denies storage until your consent banner updates it. Place it before the gtag.js script tag.
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});
gtag('config', 'G-XXXXXXXXXX');Troubleshoot when no data appears
| Symptom | Likely cause | Check |
|---|---|---|
| Nothing in Realtime | Wrong Measurement ID | Compare the ID in the page source with the stream's ID |
| Tag Assistant shows no tag | Tag not loaded or blocked | Inspect the page source and disable ad blockers |
| Data appears only in DebugView | Debug mode active, normal events missing | Confirm the tag runs without debug_mode for production |
| Data is partial | Consent denied | Confirm the consent update runs after acceptance |
Exercise
Your Realtime report shows page views, but Tag Assistant lists two Google tags. What is the most likely cause, and how do you fix it?
Show answer
The tag is installed twice, for example by a pasted snippet and a platform plugin or Tag Manager. Remove one installation so that only one Google tag loads per page.