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?
User properties are attributes you define to describe segments of your user base, such as language preference or geographic location. Analytics automatically logs some user properties; you don't need to add any code to enable them.
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. Or, on the User Properties page of your Analytics account, click Create first user property.
User properties are attributes that describe groups of your user base, such as their language preferences or geographic locations. Google Analytics automatically collects some user properties. You can also configure up to 25 additional user properties per project.
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...
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