Sub topic 10
Realtime or DebugView: which one to use
This chapter assumes you can find your way around the GA4 interface and Admin area, and that you know what events, event parameters and user properties are. It also assumes you have a property with a web or app data stream and can change the site or app code, or have Editor access, to test changes.
By now you have seen both tools. The Realtime report shows aggregate activity from all users in the last 30 minutes. DebugView shows a detailed, second-by-second stream from devices that are flagged as debug devices. They overlap, so it is easy to reach for the wrong one. This chapter gives you a way to pick the right tool for each verification task and explains the failure modes of choosing badly.
What each tool is built to answer
The two tools answer different questions.
- Realtime answers "Is my property receiving data from anyone right now, and roughly what?" It aggregates across every visitor. It is a health check for the whole stream.
- DebugView answers "What exactly did this one device send, in what order, with which parameters?" It is limited to devices in debug mode. It is an inspection tool for a single implementation.
Think of Realtime as a dashboard and DebugView as a log viewer. A dashboard tells you something is happening. A log tells you what happened and why.
Comparing the two tools
| Aspect | Realtime report | DebugView |
|---|---|---|
| Scope | All traffic to the property, including debug traffic | Only devices with debug mode on |
| Granularity | Counts per card, per event name | Individual events in order, with timestamps |
| Time window | Last 30 minutes, with a per-minute view | Per-minute and per-second timelines, with a per-device stream |
| Event parameters | Not shown for individual events | Shown for each event |
| User properties | Not shown per device | Shown for the selected device |
| Best for | Confirming data is flowing at all | Confirming each event is correct |
| Noise | Real users mix in with your test | Only your test device appears |
| Setup | None | Debug mode required |
The most important row is scope. On a busy production site your test hit is one among many, and Realtime cannot tell you which one is yours. Realtime also shows event counts but not the parameter values attached to each event. DebugView shows each event's parameters and the user properties set on that device, but only for devices in debug mode.
Decision criteria
Use these questions to pick a tool.
- Do you need to see parameter values or user properties? Use DebugView. Realtime does not show them per event.
- Do you need to know whether the tag fires at all on a live site with real traffic? Start with Realtime. It needs no setup and confirms the stream is alive.
- Do you need to confirm one specific interaction, such as a form submit, and its parameters? Use DebugView so your event is not buried in other visitors' traffic.
- Do you need to know whether real users in a given country or on a given page are sending data? Use Realtime. DebugView only sees debug devices.
- Is the site low-traffic or a staging site with only you as a visitor? Either works, but DebugView still gives more detail.
- Do you need to see whether an event is marked as a key event? Realtime has a card for key event counts. In DebugView you inspect the event itself.
- Are you testing Measurement Protocol events? Use the validation endpoint first, and add the
debug_modeparameter to the events if you want to see them in DebugView.
Using both in sequence
The tools work well together. A common pattern is to use Realtime for the broad check and DebugView for the detail.
- Open Realtime and load your site in another tab. Within a short time you should see a user appear and the
page_viewevent count rise. This proves the tag is installed and the measurement ID is correct. - If nothing appears in Realtime, the problem is at the basic layer: the wrong measurement ID, a blocked script, a consent setting that suppresses collection, or a filter. Fix that before looking at detail.
- Once Realtime shows traffic, turn on debug mode and open DebugView. Walk through the interactions you care about and check each event name and parameter.
- After the changes ship and normal traffic arrives, return to Realtime to confirm that real users produce the expected events, then check standard reports after processing time.
This order avoids a common waste of time. If you start in DebugView and see nothing, you cannot tell whether debug mode is broken or the whole tag is broken. Realtime separates those two cases.
How the tools can disagree
Sometimes Realtime shows an event and DebugView does not, or the reverse. Knowing the causes saves debugging time.
- Event in Realtime, not in DebugView. The device that sent it is not in debug mode. This is normal for real visitors. It also happens if you enabled debug mode after the event was sent, or on a different browser profile than the one you are inspecting.
- Event in DebugView, not in Realtime. Realtime includes debug traffic, so this is unusual. Check that you are looking at the same property and that the Realtime comparison or filter is not hiding the traffic. A short delay can also explain it. Reload and wait a moment.
- Counts differ. Realtime counts are for all users and for a rolling window. DebugView lists events for one device. The numbers are not meant to match.
- Event in both, but not in standard reports. This is expected for a while. Standard reports are built from fully processed data and lag behind Realtime. Do not treat an empty standard report as a tracking failure in the first hours.
Edge cases that affect the choice
Debug traffic is real data. Events sent with debug_mode also appear in Realtime. Unless you apply the Developer traffic data filter, they are also processed into standard reports. If you want your test events excluded from reports, set up the filter in Admin. The next chapters cover this in detail, but keep it in mind when you choose DebugView for testing on a production property.
Single-event debugging. You can set debug_mode on one event rather than on the whole config. Use this when you want only a single interaction to reach DebugView. It limits the noise, but you must remember to remove it afterwards.
gtag('event', 'sign_up', {
'method': 'email',
'debug_mode': true
});Mobile apps. On Android and iOS, DebugView is usually the only practical way to confirm parameters, since you cannot open a browser developer tools panel on an app event. Realtime still helps for a quick check that the app is sending anything.
Server-side and Measurement Protocol events. Events sent through the Measurement Protocol do not carry a browser, so there is no console to inspect. Use the /debug/mp/collect endpoint to validate the payload. It returns validationMessages and does not record the event. After the payload validates, send it to the real endpoint with debug_mode set if you want it in DebugView.
Programmatic checks. If you want to check recent activity from a script, the Realtime Reporting API returns the same kind of data as the Realtime cards. It does not give you parameters per event, so it is a monitoring tool, not a debugging tool.
curl -X POST "https://analyticsdata.googleapis.com/v1beta/properties/PROPERTY_ID:runRealtimeReport" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dimensions": [{ "name": "eventName" }],
"metrics": [{ "name": "eventCount" }]
}'Common mistakes when choosing
- Using Realtime to confirm parameters. Realtime shows event names and counts. If a parameter is wrong you will not see it there.
- Using DebugView to judge real user volume. DebugView only includes debug devices, so it says nothing about how many visitors send an event.
- Treating a quiet Realtime report as a failure on a low-traffic property. If nobody is visiting, there is nothing to show. Generate your own visit first.
- Treating an empty standard report as a failure. Standard reports lag. Use Realtime or DebugView to check, and look at standard reports later.
- Leaving debug mode on. It does no harm to users, but it adds test events to your data if the filter is not set up.
- Testing on a busy property in Realtime and assuming the event you see is yours. Another visitor may have triggered it. Use DebugView to be certain.
Quick reference
- Need to know if anything arrives: Realtime.
- Need to know if one event is right: DebugView.
- Need parameters or user properties: DebugView.
- Need real-user activity: Realtime.
- Need to check a Measurement Protocol payload:
/debug/mp/collect, then DebugView. - Need totals over days: standard reports, after processing.
Exercise
You added a new generate_lead event to a high-traffic site and want to confirm that it sends the value and currency parameters correctly. Which tool do you use first, and why? What is the weakness of using Realtime for this check?
Show answer
Use DebugView, with debug mode enabled on your own browser or device. It shows each event and its parameters, so you can check value and currency on your own generate_lead event. Realtime only shows event names and counts aggregated across all visitors, so it cannot show parameter values. On a busy site, an event you see in Realtime may also have been triggered by another visitor, not by your test.
Exercise
You load your staging site and nothing appears in DebugView. What is the efficient first step to find out whether the problem is debug mode or the whole tag?
Show answer
Open the Realtime report and load the site again. If Realtime shows a user and a page_view, the tag and measurement ID work, so the problem is specific to debug mode (for example the debug_mode parameter is missing or was set on a different browser profile). If Realtime also shows nothing, the problem is at the basic layer, such as a wrong measurement ID, a blocked script, or a consent setting.
Exercise
A colleague says "Realtime shows our purchase event, so the implementation is correct." What is missing from that conclusion?
Show answer
Realtime confirms only that events with that name arrive. It does not show the parameter values, such as transaction_id, value or currency, so they could be wrong or missing. You would verify them in DebugView and later in standard reports or an exploration after processing.