Iubenda logo
Start generating


Table of Contents

Full Matomo Integration Guide (formerly Piwik)

Adding Matomo (formerly called Piwik) isn’t super straight forward, this is why you have a guide with 3 steps here, two of which are optional, depending on your situation.

STEP 1: Add Matomo

Add “Matomo” from the selection of services in the iubenda dashboard.

STEP 2: Optional

Add “Analytics collected directly”, but this is really optional since it repeats what the Matomo disclosure says.

STEP 3: Adding the opt-out link to the Matomo clause

There are several legislations and corresponding practices that require the Matomo opt-out link, among them are France with its CNIL, and Germany with their fragmented Data Protection authorities (you’ll find a guide on the DPA of Schleswig-Holstein). There are certainly more cases out there. But let’s use Germany as a case for viewing material.

In short, currently, integrating with iubenda is problematic because the way the opt-out mechanism works is via an iframe (which in turn, cannot be output within our privacy policy).

If you want to add your opt-out link you need to link to the opt-out on another page of your site, but clearly describe the process needed to do so. It’s paramount that this process isn’t perceived as a way to circumvent or hide the opt-out link.

1. Find your Matomo iframe opt-out code

<iframe frameborder="no" width="600px" height="200px" src="https://example.com/index.php?module=CoreAdminHome&action=optOut&language=en"></iframe>

Your Matomo opt-out iframe can be found in your Matomo installation under Settings > Privacy. Just in case this isn’t clear yet, get your own opt-out link, this one shows an example link.

This code needs to be placed on another page on your site, which you will link to from the iubenda privacy policy. Call that page whatever you like, but ideally it will be the only thing present.

2. Add a custom service with the necessary disclosures

In this step it is important to make clear what this section helps the user to accomplish. Therefore use a title similar to “How to: User opt-out of Matomo Web Analytics”. Next you’ll want to describe in the actual service/clause, what the users need to know. See an example of this below:

How to: User opt-out of Matomo Web Analytics

The User may opt-out of the tracking done via Matomo Analytics by following the link below and then clicking the opt-out option on the presented page. Please note that the opt-out works by applying a cookie to the User’s browser which in turn signals to Matomo not to register the particular User. This means that the User needs to opt out again, when visiting this site in another browser or another device.

<a href=”{YOUR LINK HERE}”>Opt out of Matomo Analytics on this page</a>

Have you added your corresponding opt-out link? Good. Now let’s get the final step done in which we’ll need to modify the wording displayed by the iframe if your page isn’t English.

3. Important additional modifications

By adding the iframe provided in the Matomo admin, you will necessarily end up with English copy. This is what the copy says:

“Opt-out complete; your visits to this website will not be recorded by the Web Analytics tool.
Note that if you clear your cookies, delete the opt-out cookie, or if you change computers or Web browsers, you will need to perform the opt-out procedure again.”

or also

“You may choose not to have a unique web analytics cookie identification number assigned to your computer to avoid the aggregation and analysis of data collected on this website.
To make that choice, please click below to receive an opt-out cookie. ”

This needs to be properly translated into the language your site works in, or your privacy policy for that matter.

A translation needs to be manually added in the file “/lang/en.php” respectively “/lang/de.php” depending on the implementation.

Let us look at the German version as an example.

The following need to be adapted in the en.php (folder /lang) and copied into the de.php file, translated into German, then you’ll have your translation done.

'CoreAdminHome_OptOutForYourVisitors' => 'Matomo opt-out for your visitors',
'CoreAdminHome_OptOutExplanation' => 'Matomo is dedicated to providing privacy on the Internet. To provide your visitors .......',
'CoreAdminHome_OptOutExplanationBis' => 'The tag will display an Iframe containing a link for your visitors to opt-out of Matomo by... ',
'CoreAdminHome_OptOutComplete' => 'Opt-out complete; your visits to this website will not be recorded by the Web Analytics tool.....',
'CoreAdminHome_OptOutCompleteBis' => 'Note that if you clear your cookies, delete the opt-out cookie, or if you change comp....',
'CoreAdminHome_YouMayOptOut' => 'You may choose not to have a unique web analytics cookie.....',
'CoreAdminHome_YouMayOptOutBis' => 'To make that choice, please click below to....',
'CoreAdminHome_YouAreOptedIn' => 'You are currently opted in....',
'CoreAdminHome_YouAreOptedOut' => 'You are currently opted out....',

That’s it, now your users are able to both enjoy your privacy policy/website and can opt-out with full knowledge of all facts surrounding Matomo.