To add the Usercentrics web CMP script, which will surface a consent banner and control whether services can run based on your visitor's consent choices, you must copy the snippet from the Usercentrics Admin Interface.
You can find it by selecting Implementation from the main menu, on the Script Tag tab.
The Usercentrics Web CMP script in the Admin interface
Clicking the script will copy it to your clipboard.
The script can then by added to your website's template, ideally right below the opening <head> tag.
Important
If you intend to use the auto-blocking feature, you must ensure that the CMP script loads before any other scripts!
Here is an example how that might look:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Usercentrics Web CMP --> <script src="https://web.cmp.usercentrics.eu/modules/autoblocker.js"></script>
<script
id="usercentrics-cmp"
src="https://web.cmp.usercentrics.eu/ui/loader.js"
data-settings-id="XxxXXXxx"
async
></script>
<!-- End Usercentrics Web CMP -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Consent Mode implementation demo</title>
...
</head>
<body>
...
</body>
</html>