Usercentrics communicates independently with the GTM. If you have adjusted your Tags & Triggers correctly, you can play the tags DSGVO compliant without having to touch scripts on the page.

Step 1: Create variables

First, variables must be created for each service added in Usercentrics:

 

The variable should be named according to the following pattern: "consentDataProcessingService" , where DataProcessingService is always replaced by the corresponding name of the service (Case Sensitive, without spaces). type is a "data layer variable".

The configuration should look like this:

 

 

  • Name of the data layer variable: Exact name of the service as it was created in Usercentrics (Case Sensitive, spaces are taken into account!)
  • Data layer version: Version 2
  • Default value: false - Unless the service should be played by default, then true!
  • Format value: All check marks removed (default settings)

In this variable Usercentrics stores the consent status for the individual service (true = consent granted; false = no consent).

Step 2: Create Opt-Out Trigger

For each service, an opt-out trigger needs to be created. This should be fired for every event where the opt-out status is false (no opt-out). The trigger should be configured as follows:

 

  • Name of the trigger: In principle it does not matter, but the naming should be uniform and then be retained for all services, e.g."Opt-Out servicename"
  • Trigger type: Custom Event
  • Event name: ".*" + check mark for "Use regex matching". This causes the trigger to be fired on every event.
  • Conditions:
    Appropriate variable is equal to false

 

This trigger must now be added as an exception trigger for all tags of the corresponding service.

Step 3: Create opt-in trigger for "page view" tags

The previous opt-out trigger prevents a tag from being played if consent has not been given. However, if a user now calls a page where a tag was supposed to be fired, and now he clicks on "accept", the tag will still not be played because the event "page call" has already happened. For this case we still need an "Opt-In Trigger":

  • Name of the trigger: In general, it doesn't matter, but the name should be consistent and then be retained for all services, e.g. "Opt-In Service Name".
  • Trigger Type: Custom Event
  • Event name: "consent_changed Service Name" (Case Sensitive, spaces are taken into account!).
  • Conditions:

    Appropriate variable is equal to true

 

This trigger needs to be added to all tags that are played out via "page view", "window loaded" or "DOM ready". For tags that are not supposed to fire on every page but are linked to a certain URL or other conditions, for example, these conditions must also be provided in the opt-in trigger.