简体   繁体   中英

Does Firebase Analytics persist User Properties

When you set a UserProperty with

mFirebaseAnalytics.setUserProperty("favorite_food", mFavoriteFood);

does it get saved for all the following Sessions until

mFirebaseAnalytics.setUserProperty("favorite_food", null); is called? Or do I have to set this UserProperty on every app start?

Can automatically tracked events like app_start even have a UserProperty then?

A call to setUserProperty() will be persistent for all future sessions. Once set, all future logged events will be tagged with that user property. You do not need to call it each time your app starts.

This help article has some additional info:

Properties are effectively sticky event parameters that are automatically logged with every subsequent call to logEvent . After you set a user property value, it will be associated with every event logged afterwards...

setUserProperty sets a user property to a given value. Once set, user property values persist throughout the app lifecycle and across sessions.

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