– only play after login

After the integration of Usercentrics, the existing DPS must be adapted. If these are played out via a Javascript, the configuration is quite simple:

Attention!

The following changes should only be made if the banner is already online. The scripts will then only be played after approval.

The following adjustment must be made to the scripts:

To customize the scripts, two small adjustments are necessary. The first refers to the script type. Change the type in the scripts from type="text/javascript" to type="text/plain". If the script has not explicitly specified the type type="text/javascript", because it can be interpreted by the browser even without naming it, you must still change it to type="text/plain".

 

Furthermore, a so-called "data attribute" must be added.

This data attribute is structured according to the principle data-usercentrics="[consentname]", where "consentname" corresponds to the exact name of the data processing service created in the Usercentrics Admin Interface Dashboard under "Consents".

Attention: upper & lower case letters are also considered as well as spaces!

Example:

An example using the Google Analytics script:
Original:


<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXXXX-X');
</script>

becomes:

<script type="text/plain" data-usercentrics="Google Analytics" async src="https://www.googletagmanager.com/gtag/js?id=UA-XXX"></script>
<script type="text/plain" data-usercentrics="Google Analytics">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXXXX-X');
</script>