Monitor events in debug mode

Monitor events (from web or a mobile app) as they are triggered
This article is for website and/or app owners who want to monitor events in realtime in order to debug data collection.

Use DebugView to monitor the events coming from a device or browser for which you've enabled debugging. First, enable debug mode on a device or browser. Then, click DebugView in the right navigation panel to monitor events from that device or browser.

Step 1: Enable debug mode

Android

To enable Analytics debug mode on an emulated Android device, execute the following command line in a shell or terminal window:

adb shell setprop debug.firebase.analytics.app <package_name>

The device will remain in debug mode until you explicitly disable debugging:

adb shell setprop debug.firebase.analytics.app .none.

iOS

To enable Analytics debug mode on your development device, specify the following command line argument in Xcode :

-FIRDebugEnabled

The device will remain in debug mode until you explicitly disable debugging:

-FIRDebugDisabled

Browser

To enable Analytics debug mode in your browser, install the Google Analytics Debugger Chrome extension. Once installed, enable the extension and refresh the page. From that point on, the extension will log 'debug_mode':true events, until you disable the extension.

To monitor all the events on a page, add a 'debug_mode':true parameter to your gtag('config'), as shown here:

gtag('config', 'G-12345ABCDE',{'debug_mode':true});

Or, if you only want to monitor certain events, add a 'debug_mode':true parameter to just those events, for example:

gtag('event', 'xyz', {
  'debug_mode':true
});

Via Google Tag Manager

To monitor all events, use the tag type Google Analytics: GA4 Configuration and include the field 'debug mode' = true:

Or, if you only want to monitor certain events, use the tag type Google Analytics: GA4 Event and set the debug_mode field to true for the event:

Step 2: Monitor the events

Events are not visible in debug mode if you have implemented privacy-controls on the client-side, or if you've implemented Consent Mode and users have not given consent for Analytics cookies.

Once you have enabled debug mode on your device(s), navigate to DebugView (in the right hand navigation). Start using your website or app and monitor the events being triggered.

The Seconds stream (the middle column) shows the events that have been logged during the last 60 seconds. The Minutes stream (the left column) shows a series of archives of events over the last 30 minutes. The right column shows the Top Events logged during the 30-minute period, as well as the Current User Properties for the currently selected development device.

Seconds stream

By default, you see a list of events logged in the last 60 seconds. Each event displays a timestamp that corresponds to the time of its logging on the development device. Click an event to see a list of associated parameters. As user property values change during the course of app usage, you see events appear in the stream, the newest ones appearing at the top.

Minutes stream

This stream shows a series of circles, one circle for each of the most recent 30 minutes. The number in the circle indicates the count of events received in that minute. Clicking on one of these circles populates the Seconds stream with events that were logged during that minute of time. 

Top Events and Current User Properties

The Top Events table shows the top events that were logged during the 30-minute period. The Current User Properties table shows the latest state of the set of User Properties for the currently selected development device.

Device selector

If you've enabled debug mode on multiple devices, use the Device selector to choose the specific device on which the DebugView report will focus. This lets multiple developers focus on their own instrumentation and validation efforts without impacting one another. The device-selector menu is in the upper left of the report, labeled DEBUG DEVICE.

Was this helpful?
How can we improve it?