External device ID
An external device ID is a custom value you assign to a device or user. Use it to:
- Recognize the same user across sessions and platforms
- Deduplicate installs so one user is not counted as multiple new installs
- Keep continuity with identifiers you already use in other systems
Set the external device ID on your AdTraceConfig instance before you call AdTrace.onCreate(). You cannot change it after the SDK has started.
Method signature
public void setExternalDeviceId(String externalDeviceId)
| Parameter | Type | Description |
|---|---|---|
externalDeviceId | String | Your custom device or user identifier. This value is case-sensitive. If you imported external device IDs, the value you pass must match the imported value exactly. |
Set an external device ID
Call setExternalDeviceId on your AdTraceConfig instance with your identifier. See Configuration for how to create the config.
Example
- Java
- Kotlin
- Javascript
config.setExternalDeviceId("YourExternalDeviceId");
config.setExternalDeviceId("YourExternalDeviceId")
config.setExternalDeviceId("YourExternalDeviceId");