User Organization Id
property needs to be set before the Didomi initialization:Didomi.setUser()
method.
The unique user ID can be any string but we recommend sending a hashed version of your internal user ID to not expose any sensitive data on the page or to Didomi. Avoid sharing plain email addresses, user names, etc. with Didomi.digest
parameter. You will also need to provide the ID of the secret and the hashing algorithm used for generating the hash digest.hash-md5
hash-sha1
hash-sha256
hmac-sha1
hmac-sha256
algorithm
property.salt
parameter in the configuration so that Didomi can use it when verifying the user ID.expiration
parameter. This should be a valid unix timestamp value.sync.enabled
configuration option in the Didomi configuration:frequency
configuration option.sync.timeout
configuration option in the Didomi configuration:sync.timeout
configuration option accepts an integer which represents the maximum time allowed (in milliseconds) for the syncing process to be completed.sync.timeout
configuration option, the initialization continues as if there was no data to sync.setUser
method can be called before the SDK is initialized. In this case, consent synchronization will be performed as part of the initialization process.setupUI()
only after user was synchronized. Alternatively, current Activity
(Android) or ViewController
(iOS) can be passed to the setUser method, so if sdk is already initialized, consent will be asked again if user consent is partial after synchronization.reset
. If this user already gave consent using another device, these consents will be loaded. Otherwise, the user needs to give consent again.setUser(null)
on Android, clearUser()
on iOS), the Didomi ID assigned to this user will be reset, but consents will be kept locally. If you need to reset the consent as well, you can call the reset() method.activity
(Android) / containerController
(iOS) to the setUser
method, if the sdk is already initialized, setupUI
will be automatically called after synchronization is done. So if synchronized user changes and consent is partial for the new user, consent notice will be displayed automatically.