Adding the _mtm
data layer to the Admin Interface
In order for Usercentrics CMP to be able to send consent data to Matomo you will need to add the _mtm
data layer to the Usercentrics Admin Interface.
You can do this by following these steps:
- Select Implementation in the main menu.
- Select the Data Layer & Events tab.
- Enter "_mtm" in the input field labeled Data Layer Name and press the ✚ icon.
Controlling a service in Matomo
Creating variables
To tell Matomo whether a service has been consented to, you will need to create a variable for it.
You will need to do this for each Data Processing Service.
You can do this as follows:
- Select Variables in the main menu
- Click the Create new variable button
- Select Data-Layer under the Page Variables section
- Enter a name for the variable under Name, enter the exact name of the service under Data Layer Variable Name, and save the variable using the Create new variable button
Creating the consent_update event
Usercentrics CMP sends the consent_update event to the dataLayer(s) which you've added to the Usercentrics Admin Interface in the the first step of this guide.
This essentially signals the a tag manager that the user's consent choices are now known and it can start assessing which tags are allowed to load.
Follow these steps to create the trigger:
- Select Trigger in the main menu and click the Create new trigger button
- Select Custom Event
- Provide a name, enter "consent_update" under the Event Name field.
Under the Only trigger when (optional) section,, in the first field, select the name of the variable. You will find it in the Custom section.
Select equals in the second field and enter the exact name of the service in the third field.
Click the Create new trigger button to create the trigger
Making a tag "consent aware"
The final part now is to give the tag a set of rules that determines whether the tag is allowed to fire.
You can do this as follows:
- Under Tags, on the tag you've created a variable and event for, click the Edit tag button
- Scroll down to the Configure when the tag should do this section and replace PageView with the event you created for this tag earlier
- Click the Update button to save the changes.
Remember to publish your container!
Configuration complete
When you've performed the steps above your tags should respect the choices of your website vistors.
Comments
0 comments
Please sign in to leave a comment.