2

Can i set firebase analytics user properties unique for each user in android app?

If yes, how?

Is FirebaseAnalytics.setUserId(String id) meant for it?

V-rund Puro-hit
  • 5,518
  • 9
  • 31
  • 50
Darshan Kapasi
  • 187
  • 1
  • 2
  • 14

1 Answers1

1

The user properties will be attached to all events on a device until you remove them. For example, if you set a user ID to "123" for a user, all events coming out of that device will have that user property. Notice that this is per device. I hope this answer your question.

adbitx
  • 2,019
  • 8
  • 13
  • when user sign out, what is best to put in the ´setUserId()´. Until a new or same user sign in again is it ok to put ´null´? – Tord Larsen Feb 03 '17 at 10:35
  • 1
    When user signs out, you can set it to null so the next events won't have such user properties (it is essentially to remove the user property). Once user signs in back, you can set the user property to that user's ID again. – adbitx Feb 03 '17 at 16:18