In my app, I want to track the users based on business name. To track this, I'm setting value every time the user starts the app.
FirebaseAnalytics.getInstance(this).setUserProperty(Global.FIREBASE_ANALYTICS_BIZ, loginSP.getString(Global.BIZ_NM, ""));
Is this is the correct way to do it? Or, can I do this only once when they logged in?
If I set this only once when they logged in, can I see the users in active users list if they are active.
Is the setting of user property is persisted across app restarts?
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 you're only interested in finding events belonging to the same user for the same app on a single device, you can use the user_pseudo_id . This value is generated automatically by Analytics and is stored within BigQuery for each event.
The Retention section provides analytics on retention rates for your app. The table shows you information about new user retention, which is the number of users that return to the app each day.
User properties describe segments of your user base, such as language preference or geographic location. Analytics automatically logs some user properties. If you want to collect additional properties, you can set up to 25 additional user properties per project.
User properties are designed for values that only change rarely, if at all, so they are well suited for your purpose. The value of a user property persists and is reported with every bundle of events, across multiple runs of the app, reboots of the phone, etc. Uninstalling the app will erase user property values.
1. You only need to set the value the first time the user starts the app, and whenever the value changes.
2. You do not need to set a user property or log a custom event for an active user to be counted. If the user runs the app they will be counted.
3. Yes.
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