setDeviceId
The setDeviceId() method sets a custom device ID.
Syntax
getTracker().setDeviceId(deviceID)tracker.deviceId = deviceIDParameters
deviceID (string, optional)
A custom device ID. If the value is not set, an automatic value is generated.
Examples
To set a device ID to ABC123:
getTracker().setDeviceId(ABC123)tracker.deviceId = ABC123Notes
- The device ID won’t be sent if setAnonymizationState(true) is set.
Related methods
Updated about 2 months ago