How is Bitmovin Analytics User ID generated and does it persist between sessions?

The definition of userId is Random UUID that is persisted across play sessions

  • How is this ID getting generated ?
  • Does it persist across sessions (load new source/refresh the page) and how is it achieved technically ?

Hi,

On web and iOS the ID is simply a UUIDv4 string generated directly inside the analytics collector using the standard mechanisms for the platform (NSUUID() on iOS for example).

This ID is then stored inside the collector using an appropriate mechanism for the platform and persists between multiple play sessions unless the storage is being cleared.

  • web collector uses first party cookies to persist the userId (so the cookie is only available on the originating domain and can’t be used for cross-domain user tracking).
  • ios-collector in apps stores the cookie inside the app specific UserDefaults storage

android-collector uses the ANDROID_ID string which is a unique number per app-install+device+user that is also stable until the app is uninstalled or re-installed.
If this tracking is not wanted then setting the analytics configuration setting randomizeUserId to true will generate a random UUID for each new video start and not persist the userId to any storage of the device.

Hope this helps.

2 Likes