Ready for the new Google Consent Mode v2? Learn more »
General

How to add Matomo to your cookie banner (in 3 steps)


Screenshot of consentmanager CMP Dashboard

If you use Matomo cookies on your website, you may be wondering how you can integrate Matomo Analytics into your cookie banner in order to comply with GDPR requirements. In our previous guide we have already explained in detail what exactly Matomo Analytics is and how Matomo cookies work in relation to the GDPR. And in this article we will show you how you can integrate Matomo into your cookie banner using the consentmanager cookie tool.

In just three steps we will guide you through all the necessary steps to securely use Matomo cookies on your website.

What is Matomo Analytics?

Matomo (formerly Piwik) is an analytics software that is open source and represents a GDPR-compliant alternative to Google Analytics for some users. The software is fully equipped with PHP/MySQL. One of Matomo’s main functions is tracking user interactions on your website, mobile apps and software applications.

The following explains how you can do this with the consentmanager CMP and how you can integrate it into your cookie banner.

How do I integrate Matomo Analytics into my cookie banner in compliance with the GDPR?

Step 1: Add Matomo to your provider list

First you need to add Matomo to your provider list. A provider is a company or tool that is used on your website and either sets cookies or processes personal data from users. Examples of this are Google Ads, Mailchimp and Facebook.

In your consentmanager dashboard, go to the “Providers” tab in the left sidebar.

a screenshot of the consentmanager dashboard with the Vendors button highlighted

Then click on the “Add Provider” option in the top right corner of the page (see below).

a screenshot of the consentmanager dashboard with the Add System Vendor button highlighted

Then search for “Matomo” in your search bar and click “Add Provider” on the right side of the list.

Now go back to your provider list by scrolling up and clicking “Back”.

a screenshot of the consentmanager dashboard with the Back button highlighted

And the first step is done! As you can see below, you can now find Matomo in your provider list.

a screenshot of the consentmanager dashboard

Step 2: Customize the service to suit your usage and legal basis

Now you can specify and define the purpose of this tool. To do this, simply click on the “Purposes” tab on the left side of your dashboard. Click on “Use classic purposes”.

a screenshot of the consentmanager dashboard with the Use classic purposes button highlighted

Almost finished! Your list should now look like this:

a screenshot of the consentmanager dashboard

Now go back to your provider list and select the purpose of this service. You can select “Measurement”.

a screenshot of the consentmanager dashboard with the Purpose button highlighted

Step 3: Prepare scripts for the previous blocking

Finally, we will set up the pre-blocking of scripts. This is a simple adaptation to your code. Follow the example shown here → https://help.consentmanager.net/books/cmp/page/working-with-matomopiwik

Here is a screenshot of an example of the original code and the customized code after you have modified your code for the previous block.

Congratulations, you made it! You have completed the setup and can now be sure that the use of Matomo Analytics on your website is legally compliant.

Other articles you may be interested in:


more comments

Webinar mit Google: Google Consent Mode v2 verstehen und nahtlos integrieren
Videos

Webinar with Google: Understanding and seamlessly integrating Google Consent Mode v2

Due to the high demand for information on setting up and dealing with the new requirements of Google Consent Mode v2, consentmanager and Google have organized another webinar on this topic on June 12, 2024. The webinar took place in German. You missed it? No problem! The PDF of the webinar can be downloaded here […]
News

Newsletter 05/2024

New integration for Slack, MS Teams and more With the current update, a new integration function for Slack, MS Teams, Zapier and n8n is now available in the system. The function conveniently notifies you in Slack, Teams or any other tool about important changes and news (e.g. new cookies found) in your CMP account. You […]