Sub topic 8
Opening DebugView
This chapter assumes you already know what GA4 events, event parameters and user properties are, and that you have a property with a web or app data stream. You also need access to the property (Editor or higher is the safe choice) or to the site or app code you are testing. The previous chapters covered how debug mode flags events. Here you find DebugView, open it, and make sure it is ready to receive a debug device.
What DebugView is
DebugView is a GA4 report that shows the raw event stream from individual devices that are in debug mode. Standard reports aggregate data from all users and process it with a delay. DebugView does the opposite. It shows what one device sends, in near real time, event by event.
DebugView only displays events that carry the debug flag. Events from ordinary visitors never appear in it. This is why an empty DebugView does not mean your property is receiving no data. It means no device is currently sending debug events.
The report reflects a single property at a time. It shows activity from the data stream you are testing, so make sure you have the right property selected before you start.
Where to find DebugView
DebugView lives in the Admin area, not in the Reports section. The path depends on the interface version you see, but these steps cover the usual layout:
- Sign in to Google Analytics and select the property you want to test from the property selector.
- Click Admin (the gear icon, bottom left).
- In the Property column, find the Data display section.
- Click DebugView.
Some interface versions also show DebugView in the left-hand navigation under Admin > Data display. If you cannot find it, use the search box at the top of GA4 and type "DebugView". The search result opens the report directly.
You do not need to enable DebugView in the property. It is always available. What you need is a device that sends debug events.
What you see when you first open it
If no debug device has sent events in the last 30 minutes, DebugView shows an empty state. It displays a message saying that no debug devices were found, and it often lists steps for enabling debug mode. Nothing is broken at this point. The report is waiting for traffic.
When a debug device sends its first event, the page fills in without a reload. Keep the tab open while you trigger events on your site or app.
The main layout has three parts:
| Area | Position | Purpose |
|---|---|---|
| Device selector | Top of the page | Choose which debug device to inspect |
| Timeline | Center | Shows events by minute and by second |
| Event details | Right side, after you click an event | Shows parameters and user properties |
The next chapter covers how to read each of these in detail. For now, the goal is to open the report and confirm that a device appears.
How a device appears in DebugView
A device shows up in DebugView after it sends at least one event with the debug flag set. GA4 groups events by device, using a device identifier. On web this is derived from the client ID stored in the _ga cookie. On mobile it is the app instance. Each browser profile or phone is a separate device.
Several things follow from this:
- If you test in a private window, each new window can create a new device entry, because the cookie is not kept.
- If you test from two browsers, you get two devices. Pick the right one in the device selector.
- If several teammates test at once, you may see more than one debug device. The selector helps you separate them.
The device selector lists up to a limited number of recent debug devices, and shows the most recently active device first. If you do not see yours, it may have fallen out of the list or may not have sent a debug event at all.
A quick first test on the web
The fastest way to confirm that DebugView works is to flag a page load as debug traffic. Add debug_mode to the config command in your gtag.js snippet:
gtag('config', 'G-XXXXXXXXXX', {
'debug_mode': true
});Replace G-XXXXXXXXXX with your own Measurement ID. After you save and publish the change, follow these steps:
- Open DebugView for the property in one browser tab.
- Load your site in a second tab. Use a normal window if you can, so the cookie stays stable.
- Click around the site to generate events such as
page_viewandscroll. - Return to the DebugView tab. Your device should appear in the device selector, and events should start to stack up in the timeline.
Every event from that page load now carries the debug flag, so it reaches DebugView.
If you only want to test one interaction, add the parameter to a single event instead:
gtag('event', 'sign_up', {
'method': 'email',
'debug_mode': true
});Only this sign_up event is flagged. Other events from the same page are sent as normal traffic and do not show in DebugView.
How the opening sequence works
The sequence from your browser to the report has a few steps. Understanding them helps when the device does not appear.
The browser triggers the event. The library attaches the debug flag from your debug_mode setting. GA4 receives the hit and routes flagged events to the debug stream. DebugView then groups them by device. A failure at any step means no device appears.
Other ways to get a device into DebugView
You are not limited to the debug_mode parameter. These methods all produce the same result in DebugView:
- Google Tag Manager preview mode. When you start preview, GTM marks the traffic from your session as debug traffic automatically. The GA4 configuration tag does not need changes.
- Tag Assistant. Connecting your site through Tag Assistant also flags your session.
- The Google Analytics Debugger browser extension. It adds the flag to every event from your browser while it is on. Turn it off when you finish, since it stays active until you do.
- Mobile debug settings. On Android you can use the
adbcommand shown below. On iOS you use a launch argument in Xcode. These are covered in the mobile chapter. - Measurement Protocol. You can add
debug_modeto events you send server-side, covered in a later chapter.
For Android, the command takes the package name of your app:
# Android: turn on debug mode for an app
adb shell setprop debug.firebase.analytics.app com.example.myapp
# Android: turn it off again
adb shell setprop debug.firebase.analytics.app .none.Common problems when opening DebugView
| Symptom | Likely cause | What to check |
|---|---|---|
| "No debug devices" message | No flagged events in the recent window | Confirm that the flag is set and that the change is published |
| Device appears but no events | Events are sent without the flag | Check that `debug_mode` is on the config command or each event |
| Wrong property open | Selector points to another property | Compare the Measurement ID in your code with the stream in Admin |
| Device missing from the selector | Ad blocker or consent setting blocks collection | Test in a clean browser profile and check your consent banner state |
| Device list is crowded | Many testers or private windows | Test in one stable browser profile |
| Event appears in Realtime but not in DebugView | Event does not carry the debug flag | Realtime counts all traffic, DebugView counts only flagged traffic |
The last row is worth remembering. Realtime and DebugView answer different questions. If events show in Realtime and DebugView stays empty, tracking works, and only your debug flag is missing.
Exercises
Exercise
You open DebugView and see a message that no debug devices were found. In Realtime, you can see active users on your site. Does this mean your tracking is broken? What would you check first?
Show answer
No. Realtime counts all traffic, while DebugView shows only events that carry the debug flag. Tracking is working. Check that debug_mode is set on the config command (or on the event), that the change is published, and that you are viewing the same property and data stream that your code sends to. Then reload the site and look again.
Exercise
You add 'debug_mode': true to a single sign_up event. You then scroll and click other links on the page. Which events will appear in DebugView?
Show answer
Only the sign_up event. Other events from the same page, such as scroll or click, are sent without the flag, so they do not appear in DebugView.