How to add matomo to your cookie banner (3-Step Tutorial)

If you’re using Matomo Analytics on your website, you may be wondering how to include it in your cookie banner that is compliant with the requirements of the GDPR. In our previous guide (in german), we’ve 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 to integrate Matomo into your cookie banner using consentmanager’s cookie tool.

In this step-by-step tutorial, we will guide you through all the necessary steps to safely implement Matomo cookies on your website.

What is Matomo Analytics?


Matomo (formerly Piwik) is an analytics application that’s open source and, for some users, a Google Analytics alternative that’s GDPR compliant. It’s a full-featured PHP/MySQL software program. One of the main purposes of Matomo is to track user interaction on your website, mobile applications, and software applications.

How to do this with the consentmanager CMP and add it to your cookie banner is explained below.

How should I integrate Matomo Analytics into my cookie banner in a GDPR-compliant way?

Step 1: Add Matomo to your Vendor List 


First, we need to add Matomo to your list of vendors. A vendor is a company or tool that is used on your website and either set cookies or processes the personal data of visitors. Some examples are Google Ads, Mailchimp, and Facebook.

In your consentmanager dashboard, go to the Vendors tab in the left sidebar.

Then, in the top right hand corner of the ‘Vendors’ tab, click on the ‘Add system vendor’ option (see below).

Next, search for ‘Matomo’ in your search bar and click on ‘Add vendor’ on the right hand side of the list.

Now go back to your vendor list by scrolling up and clicking ‘back’.

And your first step is complete! As you can see below, your Vendor list should now have Matomo included. 

Step 2: Customize the service to your use and regulations


Now its time to add and define the purpose of this tool. The most easiest step to get started is by simply clicking on your “Purposes” Tab on the left side of your Dashboard. Once you’re there, click on “Use classic purposes”.

Almost there! Your List of Purposes should now look like this:

Now, return to your vendors list and can select the type of purpose of this service. You can select ‘Measurement’.

Step 3: Preparing scripts for prior blocking


Lastly, we are going to set up the prior-blocking of scripts. This is a simple adjustment to your code. Follow the example given here.

Here’s a quick screenshot of a before/after of adjusting your code for prior blocking. 

Congratulations, you are done! You have completed the setup and can now be sure that your use of Matomo Analytics on your website is compliant with the GDPR.

Other articles you may be interested in:

CMP

Not sure if you need a CMP?

If you are unsure if your company needs a CMP or not, please get in touch with us – we will help you find the right solution for your company!

Get In Touch