Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User properties from Firebase Analytics in DebugView

I put some user properties in my android code such as: (https://firebase.google.com/docs/analytics/android/properties)

mFirebaseAnalytics.setUserProperty("easy_account_connected", "true");

Then, I checked debug view and nothing appears whereas if there is a break point, my code stopped on this instruction. I can't understand, in my code there are other places where we can find these properties and sometimes it works (I see it in debug view) and sometimes, nothing.

Is it normal ?

I have found nothing on firebase website which could tell me debug view is not perfect but data are correctly saved ...

https://firebase.google.com/docs/analytics/debugview#seconds_stream

EDIT :

With the help of adbitx, I discovered user properties are sent with event so I made a new use case. 2 events (login / logout) and one user properties (easy_account_connected). In login case, I send :

mFirebaseAnalytics.setUserProperty("easy_account_connected", "true");
mFirebaseAnalytics.logEvent("login", null);

and in logout case, I send :

mFirebaseAnalytics.setUserProperty("easy_account_connected", "false");
mFirebaseAnalytics.logEvent("logout", null);

Here is the result in debug view login Ok / logout Nok

Login works whereas logout does not...

like image 761
mrroboaat Avatar asked Sep 05 '17 15:09

mrroboaat


People also ask

How to set a user property in Firebase Analytics?

Set a user property as follows: 1 Register the property in the User Properties page of Analytics in the Firebase console. For more information, see Set... 2 Add code to set an Analytics user property with the setUserProperties () method. You can use the name and value of your... More ...

How do I enable debugview in Firebase Analytics?

To enable sending of DebugView data on a connected Android test device for a configured Firebase Analytics app, execute the following command: This behavior persists until you explicitly disable it by executing the following command: adb shell setprop debug.firebase.analytics.app .none.

How to get the user property in debug view?

Therefore, you need to send some events and click on one of the events in the debug view to see the user property under User Properties tab. I didn't specify but in my app, all screen view are tagged with setCurrentScreen () and I have no problem with that (~20 tags).

How can Firebase help you accelerate your app development?

Tune in to learn how Firebase can help you accelerate app development, release with confidence, and scale with ease. Register DebugView enables you to see the raw event data logged by your app on development devices in near real-time.


1 Answers

From what you describe, it looks like you only have that line and no other events. It would be nice to know whether you send any events after setting the user property. The user property comes with each event after it is set. Therefore, you need to send some events and click on one of the events in the debug view to see the user property under User Properties tab.

like image 79
adbitx Avatar answered Oct 03 '22 01:10

adbitx