Configuring Usercentrics¶
Once you have installed the Usercentrics SDK, you will need an account to configure your consent banner.
Depending on your configuration you will need a SettingsID
or a RulesetID
to initialize the Usercentrics SDK
Device Options¶
In addition to the SettingsID
, you may also configure the following options to control different behaviours at a device-level:
Property | Type | Notes |
---|---|---|
Settings ID | String | A Usercentrics generated ID, used to identify a unique CMP configuration. |
Geo Rule Set ID | String | A Usercentrics generated ID, used to identify a bundle of CMP configurations to be used depending on the user's location. |
Default Language | String | Selected based on our language selection hierarchy. This property defines the language used to render the banner. e.g. "en", "de", "fr". |
Version | String | To freeze the configuration version shown to your users, you may pass a specific version here. You may find an overview of all versions in the Configuration Dashboard under Configuration > History > Settings History > Version (Column) or Implementation > Script Tag > Version History. e.g. "3.0.4". Passing "latest" (default) will fetch the latest version of your CMP configuration. Passing "preview" will fetch the latest draft of your CMP configuration. |
Debug Mode | Bool | Get all errors, warning and logs when running the SDK. |
Timeout Millis | Int | Timeout for network requests in milliseconds. We do NOT recommend overwriting this field unless absolutely necessary or for debugging reasons, as well as using any values under 5,000 ms. Default is 10,000 ms (10s). |
Consent Mediation | Bool | Toggles the Consent Mediation feature. |
[Android] Disable System Back Button | Bool | Toggles the system back button of the device. |
[Android] Status Bar Color | String | Edit the color (using hexadecimal string) of the status bar when the banner is displayed. |
These options will be available on the Usercentrics (Script) menu in your Unity IDE.
Language Selection Hierarchy¶
The SDK uses the following hierarchy, when deciding which language to load on init:
On first init, Default Language1 2 will have first priority, then Device language1 2 and finally a hard default to the first language available in your configuration. Once a language has been selected, it will be stored. Any following SDK initializations will use the Stored Language 3.
-
To be supported, a language needs to be added and set as visible in the Admin Interface, under Configuration > Setup > Language Settings. ↩↩
-
This value will only be checked during the first SDK initialized. Afterwards, the stored languages will be used. ↩↩
-
If a user explicitly selects a new language in the Usercentrics UI, or the language is changed programmatically after init, the stored languages will be updated and take priority in the future. ↩