Many organizations – including WordPress and us – have updated privacy policies to comply with General Data Protection Regulation (GDPR). As Matomo has many features to assist with GDPR compliance and anonymize tracked data, we cover how to set Matomo to display an opt-out notification verifying the user’s activity isn’t being tracked with Do Not Track enabled.
Customize Opt-out Notification
- Log into Matomo.
- Select the Settings icon in the upper-right corner.
- Select Users Opt-out on the left.
- Customize text and background of the opt-out iframe message you’ll add to your website. For example:
<iframe style="border: 0; height: 200px; width: 600px;" src="https://example.com/analytics/index.php?module=CoreAdminHome&action=optOut&language=en&backgroundColor=&fontColor=&fontSize=&fontFamily="> </iframe>
- Paste the HTML code into your website using a file editor or your website backend. The footer section is an optimal location.
- Visiting your website with Do Not Track enabled will show the following on your website:
You are not being tracked since your browser is reporting that you do not want to. This is a setting of your browser so you won't be able to opt-in until you disable the 'Do Not Track' feature.
You can disable Do Not Track support at the bottom as well.
You can read more about improving your web analytics in our Matomo Analytics Education center.