简体   繁体   中英

Retrieve user property from Firebase Analytics

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.

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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM