Display an Opt-Out Notification with Matomo Analytics

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

  1. Log into Matomo.
  2. Select the Settings icon in the upper-right corner.
  3. Select Users Opt-out on the left.
  4. 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>

    Edit opt-out notification

  5. Paste the HTML code into your website using a file editor or your website backend. The footer section is an optimal location.
  6. 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.


It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!