Sub topic 8
Testing Tagged Links with Realtime and DebugView
Assume that you know how URLs and query strings work, have a GA4 property with a web data stream installed, and can open GA4 reports. You also need a tagged URL that points to a page you control. The goal is to confirm two separate things:
- The landing page receives the UTM parameters.
- The page sends an event to the correct GA4 property with the expected campaign information.
A browser can preserve a query string while the analytics implementation still sends data to the wrong property or loses campaign values. Test both layers.
Check the URL before opening GA4
Start with a tagged link such as:
https://example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026&utm_content=hero_buttonOpen the link in a private browsing window if you want to reduce interference from previous sessions. Follow any redirects that a real user would encounter.
On the final landing page, inspect the address bar. The UTM parameters might remain visible, but some sites remove them after reading them. If they are removed, that is not automatically a problem. The page may have stored the values before changing the URL.
You can inspect the current query string in the browser console:
const params = new URLSearchParams(window.location.search);
const utm = Object.fromEntries(
[...params].filter(([key]) => key.startsWith("utm_"))
);
console.log(utm);The output should contain the values you intended to send. Check spelling, capitalization, and whether a redirect changed the destination.
Confirm the visit in Realtime
In GA4, open Reports, then Realtime. The report shows activity from the recent period, usually including users and events received during the last 30 minutes.
Perform a recognizable action on the landing page, such as opening a page or clicking a test button. In Realtime, look for the active user and the event generated by your visit. User and event counts can take a short time to appear, so do not refresh repeatedly without waiting.
Use the user details view when available to inspect acquisition information. Depending on the report layout and the event being viewed, you may see values such as:
- Session source
- Session medium
- Session campaign
- First user source or campaign
These dimensions describe different attribution scopes. Session dimensions describe the current visit. First-user dimensions describe how GA4 originally acquired the user. A returning test browser can therefore show first-user values from an earlier visit.
Realtime is useful for confirming that production-style traffic reaches the property. It is less useful for inspecting every parameter in an event payload or diagnosing a tag that fires inconsistently.
Use DebugView for event-level testing
DebugView is designed for development and validation. Open Admin, then Data display, then DebugView. Select the correct web data stream or property if your account gives you multiple choices.
A visit appears in DebugView only when GA4 recognizes the traffic as debug traffic. Common ways to enable this include:
- Use Google Tag Manager Preview mode.
- Use a browser extension that sets GA4 debug mode.
- Send events with the
debug_modeparameter during development.
Do not add debug_mode permanently to all production traffic. DebugView is for testing, and debug traffic can be affected by privacy settings, consent configuration, ad blockers, or an incorrect measurement ID.
Select the active device in DebugView. Events appear in a timeline. Select an event to inspect its parameters. Check that the expected page location, page title, and event parameters are present. Campaign attribution may be associated with the session rather than displayed as a parameter on every event.
The following flow shows the validation path:
Diagnose missing or incorrect results
| Symptom | Likely cause | Check |
|---|---|---|
| No user in Realtime | The tag did not fire, consent blocked it, or the measurement ID is wrong | Browser network requests, consent state, and stream ID |
| User appears but campaign is missing | The UTM values were removed before GA4 read them, or the visit was not a new session | Final URL, redirects, and a fresh test session |
| DebugView is empty | Debug mode is not enabled or the wrong property is open | Tag Assistant, debug extension, and property ID |
| Source shows the website itself | An internal link added UTM parameters and started a new campaign session | Remove UTM parameters from internal navigation |
When a result is missing, test one layer at a time. First verify the final URL. Next verify that the GA4 request reaches the intended property. Then inspect Realtime and DebugView. A report cannot correct data that the collection tag never received.
Exercise
A tagged link appears in Realtime, but DebugView is empty. What should you check first?
Show answer
Check that the visit is being sent to the same GA4 property you opened and that debug mode is enabled through Tag Manager Preview, a debug extension, or a development-only debug_mode setting.