Reputation: 438
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?
Upvotes: 8
Views: 3521
Reputation: 97
setUserProperty sets a user property to a given value. Once set, user property values persist throughout the app lifecycle and across sessions.
Upvotes: 0
Reputation: 21399
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...
Upvotes: 13