Optional Steps
Draft Script¶
To test new changes within the Admin Interface before releasing them to your live environment, you can save any changes to a draft version. To display this draft version, you will need to add a data-draft="true" attribute to the CMP script tag.
<script
id="usercentrics-cmp"
data-settings-id="YOUR_SETTINGS_ID"
src="https://web.cmp.usercentrics.eu/ui/loader.js"
data-draft="true"
</script>
Adding a nonce to the script tag¶
To add a nonce to your personal script, you can add it like so:
<script
id="usercentrics-cmp"
data-settings-id="YOUR_SETTINGS_ID"
src="https://web.cmp.usercentrics.eu/ui/loader.js"
nonce="nonce-VALUE"
</script>
<script
id="usercentrics-cmp"
data-settings-id="YOUR_SETTINGS_ID"
src="https://web.cmp.usercentrics.eu/ui/loader.js"
data-tcf-enabled
nonce="nonce-VALUE"
</script>
White labeling URLs¶
For customers that only allow sources from the same domain on their websites for security reasons, you can now configure from which address all Usercentrics resources (JSON files, JavaScript files etc.) should be loaded.
This should be configured before the UI script from "Add the JavaScript Tag"
In order to configure the domains please define the window variable called ucCmpConfig with the following structure:
window.ucCmpConfig = {
proxy: {
api: '',
consent: '',
crossDevice: '',
logger: '',
cdn: '',
}
}
Our Endpoints¶
Important
Your proxy servers should point to the following domains
Regarding Cross Domain Consent Sharing feature you can white label only the domain via app key or provide a full URL to be used for this feature via crossDomainConsentSharingIFrame key
| Name | Purpose | Key | Domain |
|---|---|---|---|
| Api | Api to communicate between the UI and the SDK / backend | api | https://v1.api.service.cmp.usercentrics.eu |
| Consents | Get the consents data for Cross Domain feature | consent | https://consent-api.service.consent.usercentrics.eu |
| Cross Device Consents | Get the consents data for Cross Device feature | crossDevice | https://consent-rt-ret.service.consent.usercentrics.eu |
| GraphQL | Stores all user decisions on server | logger | https://graphql.usercentrics.eu |
| CDN | URL used on Cross Domain Consent Sharing Iframe to get data | cdn | https://web.cmp.usercentrics.eu |