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 will always contain the most stable User ID, either the cross_domain_user_id
or the domain_user_id
.
The leading User ID is different per platform: web, iOS or Android and specified below. The aggregated tables for reports do not contain any of the user_ids
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.The leading User ID (user_id
in the database) is the cross_domain_user_id
if it is present, otherwise the domain_user_id
.
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
The leading User ID (user_id
in the database) is the domain_user_id
.
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.The leading User ID (user_id
in the database) is the domain_user_id
.