Configuring HTML scripts
We need to modify the script to have the following properties:
The script
type
must equaltext/plain
. If your script line doesn't have a type, add it.It must have a
data-usercentrics
property equal to the name of the tool on your Personal Data Inventory and Cookie Banner.It must not have an
async
property.
Example of how we would modify our Trustpilot script on our website.
// Original Script
<script type="text/javascript" src="//widget...js" async></script>
Change the
type
attribute totype=text/plain
// Original Script
<script type="text/javascript" src="//widget...js" async></script>
// Step 1: change type attribute
<script type="text/plain" src="//widget...js" async></script>Add an attribute called
data-usercentrics="Trustpilot"
. Make sure that the name of the Tool and Third Party matches exactly the name that appears on your Tools and Third Parties.// Original Script
<script type="text/javascript" src="//widget...js" async></script>
// Step 1: change type attribute
<script type="text/plain" src="//widget...js" async></script>
// Step 2: add data-usercentrics="Trustpilot"
<script type="text/plain" data-usercentrics="Trustpilot" src="//widget...js" async></script>Remove any async attributes. It may be the case that your script doesn’t have it.
// Original Script
<script type="text/javascript" src="//widget...js" async></script>
// Step 1: change type attribute
<script type="text/plain" src="//widget...js" async></script>
// Step 2: add data-usercentrics="Trustpilot"
<script type="text/plain" data-usercentrics="Trustpilot" src="//widget...js" async></script>
// Step 3: remove any async attributes
<script type="text/plain" data-usercentrics="Trustpilot" src="//widget...js"></script>