How can the userId be randomized for each session of the same user?
There are several reasons why companies want to generate a new userId
for each sessions. How this works on web is outlined here. Please note, when you decide to randomize the userId as outlined below, the metric Unique Users
will be equal to the Plays
metrics.
On Android
On Android there is setting in the BitmovinAnalyticsConfig
called randomizeUserId
. If this setting is set to true
then every time the collector is attached a new userId will be generated. If a user is watching playlist, the user will have same id for every video in playlist.
If this setting is set to false
then Settings.Secure.ANDROID_ID
will be used as userId, which is not a random value!
On iOS
On iOS the behavior is consistent with the one on Android. In the BitmovinAnalyticsConfig
there's a setting called randomizeUserId
. If this setting is set to true
then every time the collector is attached a new userId will be generated.
If this setting is set to false
then a random ID is generated, stored in the UserDefault Store
and retrieved every time the user starts a session.
Updated 3 months ago