Sub topic 9
Verifying data with Realtime reports and DebugView
This chapter shows how to confirm that a new web data stream is sending events and that those events carry the right names and parameters. It assumes you have a GA4 property with a web data stream and can edit the page template or Google Tag Manager container, and that you know the measurement ID format (G-XXXXXXXXXX). It also assumes you can open your browser's developer tools.
Why verify before you trust the data
Installing the tag is not the same as collecting good data. A tag can load and still send events to the wrong stream, fire twice per page, or be blocked by a consent banner. Standard reports can take 24 to 48 hours to fill in, so a mistake found on day two means two days of bad data. GA4 offers two tools that answer different questions:
| Tool | Question it answers | Scope | Setup needed |
|---|---|---|---|
| Realtime report | Is any data arriving at all? | All users on the property in the last 30 minutes | None |
| DebugView | Are my events and parameters correct? | Only devices in debug mode | Debug mode enabled |
| Browser Network tab | Is the browser sending the request? | Your own browser session | Developer tools |
Use them in this order: Network tab, Realtime, then DebugView.
Checking the browser first
Open the page, open developer tools, go to the Network tab, and filter by collect. Reload the page. You should see a request to a URL that contains /g/collect. Open it and look at the query string:
tidis the measurement ID the tag is sending to. It must match your stream.enis the event name. On first load you expectpage_view.dlis the document location, the page URL.
A successful request returns status 204 or 200. If you see no request, the problem is in the page (tag missing, script blocked, or consent not granted), not in GA4. Fixing it there saves time.
Using the Realtime report
Realtime shows activity from the last 30 minutes, with a delay of a few seconds. Open it from Reports > Realtime.
- Open your site in a new browser window, not in the window where you are viewing GA4.
- Switch to the Realtime tab. Within a few seconds, the "Users in last 30 minutes" card should show at least 1.
- Look at the cards for page title or screen name, event count by event name, and the country or city map.
- Click around the site. Scroll to the bottom of a long page, click an outbound link, and run a site search if you have one. Event names such as
scroll,click, andview_search_resultsshould appear if enhanced measurement is on.
You can add a comparison or filter to isolate your own visit, for example by country or device category. Selecting a user card also shows a snapshot of the events that user triggered.
What Realtime does and does not prove
Realtime proves the property receives hits. It does not prove the events are right. It shows event names and counts, but not the full parameter detail you need to check a custom event. It also does not guarantee that the numbers will match the standard reports, because those go through additional processing.
Realtime can look empty even when the tag works. Common reasons:
- An active internal traffic data filter is excluding your own IP address.
- An ad blocker or privacy extension is blocking the request.
- The consent banner has not been accepted and consent mode denies analytics storage.
- You are looking at the wrong property in the account selector.
Using DebugView
DebugView shows individual events from individual devices as they arrive, with their parameters. Open it from Admin > Property settings > Data display > DebugView. In some interface versions it sits directly under Admin > Data display. It only shows devices that are in debug mode, so you must switch that on first.
Ways to enable debug mode
- Add
debug_modeto the config call in the tag. - Use Tag Assistant: when you connect to your site, the connected session is treated as debug traffic.
- Use Preview mode in Google Tag Manager, which sets debug mode on the events it sends.
- Install the Google Analytics Debugger browser extension.
The first approach works with the standard tag from the previous chapters. Add the parameter to the config call:
<script>
gtag('config', 'G-XXXXXXXXXX', {
'debug_mode': true
});
</script>Replace G-XXXXXXXXXX with your measurement ID. In a real page, this replaces the plain gtag('config', ...) line from the base snippet. Keep only one config call for the same ID, or you risk sending page_view twice.
You can also mark a single event as a debug event without changing the config call:
gtag('event', 'verification_test', {
debug_mode: true,
test_run: 'launch-check-1'
});This is useful on a live site where you do not want every visitor to appear in DebugView.
Reading the DebugView screen
DebugView has three main areas:
- Device selector at the top left. If several debug devices are active, choose yours. A device is usually shown as a model name or browser.
- Seconds stream in the center. It shows a timeline grouped in minutes and seconds. Each event is a blue dot, and a flag icon marks a conversion event.
- Minutes stream on the left. It shows the same events grouped by minute.
Click an event name to see its parameters on the right. For page_view, check page_location, page_title, and page_referrer. The panel also shows user properties and, depending on the event, engagement_time_msec. If you set a custom parameter such as method on sign_up, you should see it with the exact spelling and value you sent.
Test a recommended event with its parameter:
gtag('event', 'sign_up', {
method: 'email'
});After you run it on a page with debug mode on, the sign_up event should appear in the seconds stream, and clicking it should show method with the value email. If the event appears but the parameter does not, check for a typo, a parameter nested in the wrong object, or a value of undefined.
A verification workflow
Common problems and how to read them
| Symptom | Likely cause | What to check |
|---|---|---|
| No `collect` request | Tag not on the page, script blocked, or consent denied | View page source, disable ad blocker, test the consent state |
| Request sent but Realtime is empty | Wrong measurement ID or an active data filter | Compare `tid` to the stream, review Admin > Data collection and modification > Data filters |
| `page_view` appears twice | Tag installed twice, for example a CMS plugin plus a hard-coded snippet, or GTM plus gtag.js | Search source for both `gtag/js` and `gtm.js`, and remove the duplicate |
| Events in Realtime but not DebugView | Debug mode not enabled for that device | Confirm `debug_mode`, or connect through Tag Assistant |
| Parameter missing in DebugView | Typo or wrong parameter name | Compare with the event call and check the exact spelling |
| Data in one environment only | Staging uses a different stream or none | Compare measurement IDs across environments |
Single-page applications need extra attention. A route change does not reload the page, so page_view fires only if enhanced measurement's browser history change detection is on or you send the event yourself. If you navigate between routes and DebugView shows no new page_view, check that setting first.
Clean up after testing
Debug mode is for testing. Remove debug_mode from the config call after verification, or limit it to a single test event. Left on for all visitors, it fills DebugView with unrelated traffic and makes your own session hard to find. Also review data filters: GA4 can treat debug traffic as developer traffic, and a filter for it can be in the Testing or Active state. Check its state under Admin > Data collection and modification > Data filters so that you know whether debug sessions are counted in your reports.
Exercises
Exercise
You load your site with the Network tab open and see a /g/collect request with status 204, but the Realtime report shows zero users. Name two checks you would make next.
Show answer
First, compare the tid value in the request to the measurement ID of the stream in the property you are viewing, since a wrong ID sends data elsewhere. Second, check Admin > Data collection and modification > Data filters for an active internal traffic or developer filter that excludes your own visit. Also confirm you have the correct property selected in the account switcher.
Exercise
DebugView shows your sign_up event, but the method parameter is missing. The code is gtag('event', 'sign_up', { methd: 'email' });. What is wrong, and how do you confirm the fix?
Show answer
The parameter name is misspelled as methd, so GA4 records a parameter called methd instead of method. Correct the spelling, reload the page with debug mode on, trigger the event again, and click sign_up in the DebugView seconds stream to confirm method shows the value email.
Exercise
Why should you remove debug_mode from the config call after testing?
Show answer
With debug mode on, every visitor's events appear in DebugView, which buries your own test session. The data may also be treated as developer traffic and handled differently by data filters. Debug mode is for short verification sessions only.