Share consents across devices

Introduction

The Didomi CMP supports syncing to allow consent sharing across devices and environments. Consent can be shared between all environments that have syncing enabled in the same organization: multiple websites, multiple apps (same or multiple devices), multiple websites and apps together, etc.

When syncing is enabled and an organization user ID is available, the Didomi CMP will load the previously stored user choices from the Consents API and will apply them locally.

Syncing is currently in beta. Please reach out to our Support team ([email protected]) to enable the feature for your account.

Configuration

Setting user organization ID

For the sync process to work properly, a user.organizationUserId property needs to be set in the Didomi configuration object:

window.didomiConfig = {
user: {
organizationUserId: 'organization-user-id',
}
};

This value represents the unique identifier with which the organization identifies the user for which it wants to sync the consents. This can be an email address, a user ID, etc. We recommend hashing the value to not communicate plain user IDs to Didomi.

Enabling sync

The sync process can be enabled with async.enabled configuration option in the Didomi configuration object:

window.didomiConfig = {
user: {
organizationUserId: 'organization-user-id',
},
sync: {
enabled: true
}
};

Behavior

Sync timeout

The maximum time allowed for the syncing process to be completed can be specified with a sync.timeout configuration option in the Didomi configuration object:

window.didomiConfig = {
user: {
organizationUserId: 'organization-user-id',
},
sync: {
enabled: true,
timeout: 2000
}
};

The sync.timeout configuration option accepts an integer which represents the maximum time allowed (in milliseconds) for the syncing process to be completed.

If the syncing process takes more time to be completed than it is specified in sync.timeout configuration option, the initialization continues as if there was no data to sync.

Delaying notice showing

The Didomi CMP enables delaying notice showing while the sync is in progress. This ensures that the user never sees the consent notice if sync is possible.

The sync.delayNotice configuration option can be used for delaying the notice showing until the sync is complete:

window.didomiConfig = {
user: {
organizationUserId: 'organization-user-id',
},
sync: {
enabled: true,
delayNotice: true
}
};