Validate your Analytics configuration with DebugView

Use DebugView to validate your Analytics configuration for apps during development.

To conserve network data and battery life on mobile devices, Analytics deployments poll usage data periodically – usually once per hour. However, during development, it’s helpful to see events immediately so you can make adjustments without having to wait. DebugView lets you monitor your app's and/or website's events in real time.

To use DebugView, you must first enable Debug mode on your device or site.

Enable on a mobile device or browser

Android

To enable Analytics Debug mode on an emulated Android device, execute the following command line:

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

This behavior persists until you explicitly disable Debug mode by executing the following command line:

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

This behavior persists until you explicitly disable Debug mode by specifying the following command line argument:

-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 events in your app in debug mode.

You can view events logged in the DebugView in the Firebase console.

Note: Before using DebugView, you should ensure that your device time is accurate. A skewed device clock will result in delayed or missing events in your Analytics reports.

Enable on a website

Via gtag.js for all events

Include a 'debug mode' = true parameter; for example:

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

Via gtag.js for individual events

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

Via Google Tag Manager for all events

Use the tag type Google Analytics: GA4 Configuration.

Include the field 'debug mode' = true:

Via Google Tag Manager for individual events

Use the tag type Google Analytics: GA4 Event.

Set the debug_mode field to true for the event:

Reporting

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 development devices, navigate to DebugView and start using your app to see your app’s events being logged in the DebugView report.

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. You can 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. This allows you to examine the events logged over the last 30 minutes in fine-grained detail.

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

Since many different development devices can have Debug mode enabled, you can 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?

Need more help?

Sign in for additional support options to quickly solve your issue