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 ADTConfig instance before you call [Adtrace appDidLaunch:] / Adtrace.appDidLaunch(...). You cannot change it after the SDK has started.
Panel support
External device ID support in the Adtrace panel may be limited. Confirm availability with your Adtrace account team before relying on it in production reporting.
Method signature
- (void)setExternalDeviceId:(NSString *)externalDeviceId;
You can also assign the externalDeviceId property directly on ADTConfig.
| Parameter | Type | Description |
|---|---|---|
externalDeviceId | NSString | 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 ADTConfig instance with your identifier. See Configuration for how to create the config.
Example
- Objective-C
- Swift
- Javascript
[adtraceConfig setExternalDeviceId:@"YourExternalDeviceId"];
Or assign the property:
adtraceConfig.externalDeviceId = @"YourExternalDeviceId";
adtraceConfig?.externalDeviceId = "YourExternalDeviceId"
adtraceConfig.setExternalDeviceId('YourExternalDeviceId');
If you also need the value in callbacks or exports, you can pass it as a session callback parameter.