I am currently setting Firebase Analytics properties like gender and usernames as follows:
firebaseAnalytics.setUserProperty("username", /*someusername*/);
After successfully setting them I want to be able to receive them at some other point inside my application. Somehow similar to the Firebase Database.
Is this possible? I have not found any explanation in the Firebase documentation.
You can access this data from the Custom Definitions page of Analytics in the Firebase console. The page shows a list of user properties that you have defined for your app.
To find some user properties that you want to create, go to the data layer screen in your Tag Manager account to see what values you are tracking and find the ones you want to recreate in GA4.
If the user login with a custom "email/password" you don't know anything else about that user (apart from the unique user id). If a user login with Facebook, or with Google sign in, you can get other information like the profile picture url. It is explained here: firebase.google.com/docs/auth/android/… .
Currently, it is not possible to retrieve Firebase Analytics User Property.
The best way you can do is to also store those properties to Firebase Database for each user. The database structure should look something like this
{
"users": {
"<uid>": {
"username": "someusername",
"gender": "M",
"birthDate": 758634444000
}
}
}
The uid
is retrieved from FirebaseUser.getUid()
Hope this helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With