Skip to content

Testing analytic events

Analytic events would be difficult to test if we were to wait for the build to be released and the events to be sent to BigQuery/Google Analytics the next day. That's why there is DebugView, as described in this article by Firebase: Monitor collected events and user properties using DebugView.

Android

Debug mode lets you view analytic events in real time. You need to connect your phone to the computer via a cable, enable adb connection and in the Firebase console, go to Analytics > DebugView. This view lets you investigate which events are sent when and with what parameters and user properties.

Warning: Chrome sometimes doesn't work well, probably due to various adblocks that you might have installed. Safari works well for me.

Steps to enable:

  1. Install adb on your computer and set the adb command to the PATH.
  2. Connect your phone to your computer via a cable. The "USB preferences" should make no difference (whether the usb is used for charging or file transfer etc.).
  3. Go to Settings > System > Developer options > toggle Use developer options.
  4. Enable "USB debugging". On your computer, a dialog might pop up to allow debugging or connecting to the device (i.e. your phone). On your phone, a dialog to allow USB debugging might appear; check Always allow from this computer if you are using your own laptop, and click Allow.
  5. Go to your Terminal / Command line and enter:
    adb devices
    

This should show one device connected (an alphanumeric code and the word "device").

For production app, enter this command:

adb shell setprop debug.firebase.analytics.app cz.destil.settleup

For sandbox app, enter this command:

adb shell setprop debug.firebase.analytics.app io.stepuplabs.settleup.sandbox
  1. In the browser, go to Firebase DebugView, select the appropriate project (Settle Up Live) and start clicking in Settle Up on your phone. The web page should start showing some events, and the Debug Device list in the upper left-hand corner should display your phone. Refresh the website if not.
  2. When you click on an event, a list of parameters and user properties will show on the right side and you can check that the app is sending the intended data to Google Analytics.

iOS

To enable debug mode in the iOS app, go to About from the left navigation and click the company logo 5 times, then the app version twice, and then the company logo 5 times again. This will add the word "debug" to the app version, which is how you recognize that you did it correctly. Now the debug menu will open when you physically shake the phone.

At the bottom, click on Analytics, where you can check that the app sends events and their parameters correctly. Turn on the Analytics toggle in Options to show popups each time the event happens. However, they may be stacked or disappear too quickly, so the Debug menu is a safer place to check analytical events overall.

You can also force ads, before-ad, app version update or system update situations, and perform other actions in the Debug.

Web app

Install the Google Analytics Debugger and follow instructions.