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

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

string(44) "https://www.consentmanager.net/en/knowledge/"

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 articles

News

Newsletter 01/2025

Cookie Banner Legal Shield: Protect your business Game changer for cookie banners: consentmanager is the first compliance solution to take responsibility for legal warnings against its customers’ cookie banners. Not sure if your cookie banner is GDPR compliant? With consentmanager’s new Cookie Banner Legal Shield, your business is protected from costly legal disputes for non-compliance with the GDPR. […]
General

Privacy-friendly tools for your website in 2025

In a statement by the founder of WPBeginner, the average website utilizes around 30 plugins for functions such as analytics, SEO, and payment processing. As website owners increasingly rely on online tools and plugins, ensuring compliance with data protection laws has become more challenging. Since the introduction of the GDPR, fines within the EU have surged by […]