Analytics · Advanced Topics · User IDs

Onesecondbefore tracks (anonymous) user ids to group hits per user. Per platform we use different user IDs. This section gives an overview.

The hits table, contains 3 user fields: user_id, cross_domain_user_id and domain_user_id The user ID that you should use is the user_id field in the hits table. It contains the value of cross_domain_user_id unless it is NULL. In that case the domain_user_id will be used. Below you can see what is in the cross_domain_user_id and domain_user_id fields per platform. The aggregated tables for reports do not contain any of the user_ids

Web

User IDs of the JavaScript tracker.

  • cross_domain_user_id is a server side cookie id that remains the same across domains. Many browsers and adblock browser extensions block this type of cookie. In that case the value will be NULL.
  • domain_user_id is a client side cookie id that is different per domain. The domain_user_id is always present.

Android

User IDs of the Android SDK.

  • cross_domain_user_id is the Android Advertising ID. The advertising ID is a unique, user-resettable ID for advertising, provided by Google Play services. If a user does not share it's Android Advertising ID, the field will be NULL.
  • domain_user_id is the Settings.Secure.ANDROID_ID or SSAID. It's app-scoped and resettable (with a factory reset or when the signing key rotates between uninstall and reinstall events). It has the format of 945a5ca7653a6e57

iOS

User IDs of the iOS SDK.

  • cross_domain_user_id is the ID for Advertising (IDFA). The identifier for advertisers (known as the IDFA) is a random device identifier assigned by Apple to a user’s device. Since the rollout of iOS 14.5 and App Tracking Transparency (ATT) advertisers are required to ask for user consent via a prompt to access the IDFA. If a user does not give their consent to access the IDFA, the field will be NULL.
  • domain_user_id is the identifier for vendors or IDFV The identifier for vendors (IDFV) is a unique, alphanumeric identifier assigned by Apple to all apps on a single device that are from the same publisher/vendor. This means if a user has downloaded, for example, three apps from the same vendor onto one device, the IDFV will be shared across all three and available to the developer.The identifier for vendors (IDFV) is a unique, alphanumeric identifier assigned by Apple to all apps on a single device that are from the same publisher/vendor. This means if a user has downloaded, for example, three apps from the same vendor onto one device, the IDFV will be shared across all three and available to the developer.