Basic configuration
After the extension is installed first you have to load the typoscript into your static template.
Warning
If it is not loaded you will get an exception in your frontend
Basic configuration
After the typoscript is loaded you have to override the constants of this extension and set them to load the usercentrics Library on you page.
Best Practice
Create a Constants. file in your provider extension to override the default constants. You can
create it in subfolder like this: my_.
Make sure that this file is also loaded in your constants. file. To load this file add an import in it.
@import 'EXT:
Now place this code in it and set the constants to your need.
plugin.tx_liausercentrics {
srcUrl = https://web.cmp.usercentrics.eu/ui/loader.js
settingsId =
ucQueryParameter =
settings {
activate = 0
tcfEnabled = 0
useSmartDataProtector = 0
footerLink = 0
excludedPages =
whitelistedSDPServices =
customOverlayIntegration =
}
}
To load Usercentrics, enter your Usercentrics ID in settingsId and set the constant activate to 1. If you want to use the Smart Data Protector, set the constant the constant useSmartDataProtector to 1.
Note
The Smart Data Protector scans your system for known services and blocks them automatically. It also offers the option of using the overlays from Usercentrics. So you don't have to build your own.
Language
The current language is passed to Usercentrics automatically by getting the language code from the current locale:
plugin.tx_liausercentrics {
...
language = TEXT
language.data = siteLanguage:locale:languageCode
...
}
The language variable accepts plain strings and content objects like TEXT.
TCF enabled
Set the constant tcfEnabled to 1 to add the data-tcf-enabled attribute to the Usercentrics script tag.
This activates the IAB Transparency & Consent Framework (TCF) mode in Usercentrics.
See also
IAB TCF documentation on the Usercentrics website.
plugin.tx_liausercentrics {
settings {
tcfEnabled = 1
}
}
This renders the following script tag in the page header:
<script id="usercentrics-cmp" src="..." data-settings-id="..." data-language="..." data-tcf-enabled></script>