Skip to main content
Matomo Tag Manager

Cookie Control SDK implementation in Matomo Tag Manager

Updated over a week ago

Introduction to Matomo Tag Manager

You can use Matomo Tag Manager in conjunction with our cookie pop-up to ensure that the technologies that you use on your website are consented to by your users before they are fired.

This article assumes that you have already created a Matomo account, and added the Matomo container snippet to your website. If you have not done so, you should head over to Matomo's documentation in order to get started.


Setting up your triggers


There are two main components that we will work on within this guide: tags and triggers.

A tag is a snippet of code which can be executed on your site. They are usually used to collect data or perform specific actions on a website or app.

A trigger is a predefined condition or set of conditions that determine when a specific tag should be executed or fired on a website. Triggers are essential components in tag managers as they control the timing and circumstances under which tags are activated.
In our case, the triggers that you will make during this guide will help you to only fire the tags you have set up when the user has given their consent to those cookies.

You will need to create the three following triggers to be used in your Matomo configuration:

Name: CI Functional
Event Name: cookie_cat_functional

Name: CI Marketing
Event Name: cookie_cat_marketing

Name: CI Statistical
Event Name: cookie_cat_statistic

In order to get started, you should navigate to your Matomo Tag Manager Dashboard.

To create the triggers, repeat each of these steps for all three of the above:

  • Under the "Triggers" section click "+ CREATE NEW TRIGGER"

  • Scroll all the way down and choose "Custom Event"

  • Assign a name, description and the matching event from the list above. Make sure that the event name matches exactly: all lowercase letters.

  • Click the "CREATE NEW TRIGGER" button to save the trigger

    Repeat for all three triggers. You are then ready to start applying these triggers to your tags.


Applying the triggers to tags

Depending on the different technologies that you use, you will want to use different triggers on each of your tags. Each tag will set different types of cookies and you will need to ensure that the user has consented to that cookie category before firing the tag.

When setting up your tag, you should scroll down to the section called "Configure when the tag should do this", as shown below.

You can choose the corresponding category based on the cookies that the tag will fire.

You are able to choose more than one trigger should you need to, for example, if a cookie requires both the marketing and statistical categories to be consented to.

Once you have placed the correct triggers on your tags, the corresponding cookies should be held back from being fired until the user has given their consent.

If you have questions on how you can implementing our solution into Matomo Tag Manager, please get in touch with us at support@cookieinformation.com


Did this answer your question?