简体   繁体   中英

Firebase Analytics Setting User Property Multiple Times

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, ""));
  1. Is this is the correct way to do it? Or, can I do this only once when they logged in?

  2. If I set this only once when they logged in, can I see the users in active users list if they are active.

  3. Is the setting of user property is persisted across app restarts?

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.

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