External device ID
An external device ID is a custom value you assign to a device or user. Use it to recognize users across sessions and platforms, or to deduplicate installs so one user is not counted as multiple new installs.
Set externalDeviceId in Adtrace.initSdk on first load.
Parameter
| Parameter | Type | Description |
|---|---|---|
externalDeviceId | string | Your custom identifier for the device or user. |
Example
Adtrace.initSdk({
appToken: '{YourAppToken}',
environment: 'sandbox',
externalDeviceId: '{YourExternalDeviceId}',
});
Important
The ID must be unique per user or device, depending on your use case. Reusing the same ID across different users or devices can cause duplicated or mixed data. Contact your Adtrace representative if you need help choosing a strategy.
Send the ID to your backend
To use the external device ID in your analytics pipelines, pass it as a global callback parameter or an event callback parameter.