Introduction

Complianz – GDPR/CCPA Cookie Consent is a highly rated WordPress plugin which supports third party blocking, auto-detection/configuration of plugins and handles consent requirements for different countries based on visitor geo-location. A step-by-step setup wizard makes configuration quick and easy.

Complianz includes built-in support for Matomo

In this step-by-step guide you will learn how to set up Complianz and Matomo to work together. Complianz will request and track visitor consent, enabling or disabling Matomo analytics tracking based on the visitor’s consent status.

Prerequisites

Before following the instructions in this guide you should already have installed the Complianz plugin on your WordPress site.

If you will use the Matomo for WordPress plugin to provide Matomo statistics directly in WordPress then this plugin should be installed and activated.

If you host Matomo elsewhere or use Matomo Cloud then the WP-Matomo integration plugin should already be installed and activated.

Step 1) Activating Complianz when your site already has Matomo setup

Activate the Complianz plugin.
Follow the wizard until the Statistics step:

Complianz should automatically detect Matomo on your site and choose the appropriate answer.
Continue to the next step Statistics Configuration

If you are using the Matomo for WordPress plugin or the WP-Matomo integration plugin then answer No to Do you want Complianz to add Matomo to your website?

Continue through the wizard to the Cookie descriptions and Service descriptions steps, where you should see auto-configured entries for Matomo.

Adding Matomo to your site when Complianz has already been configured

After activating and configuring the Matomo plugin, navigate to the Complianz menu > Wizard > Consent.
Scan for cookies and choose Save and Continue.
Then work through the steps as described in the Activating Complianz when your site already has Matomo setup section above.

Matomo can apply consent in two different ways:

“Consent to Track”

If personal data is tracked, such as user identifiers or eCommerce orders, then this mode should be used. If consent for Statistics cookies is not given then Matomo will not perform any tracking at all.

This is the default mode when using Complianz configured with the options in Step 1, no changes are necessary if you wish to use this mode.

“Consent to Cookie”

This mode can be used when personal data is not being tracked. If consent to use Statistics cookies is not given then Matomo will still track visitors without using cookies and provide a full range of metrics, however the accuracy of some metrics may be reduced. Cookies will only be used if consent for Statistics cookies was given in Complianz.

To configure “Consent to cookie” follow these steps:

  • Navigate to the Complianz menu > Wizard > Consent.
  • On the Statistics step answer Yes to Use cookieless tracking?
  • On the Statistics step answer Yes to Do you want Complianz to add Matomo to your website?
  • Enter the URL for your Matomo installation and the Matomo site ID
    • If you are using the Matomo for WordPress plugin then the URL for your Matomo installation will be: your-domain.com/wp-content/plugins/matomo/app
    • For Matomo on-premise or Matomo cloud enter the URL you use to access to Matomo dashboard.
    • Save your changes.
  • Remove any existing Matomo tracking code from your WordPress site.
    • If you manually added the Matomo tracking code to your WordPress site then you need to remove it.
    • If you are using the Matomo for WordPress plugin then navigate to the Matomo Analytics menu > Settings, change the Add tracking code option to Disabled and save your settings.

Find out more about personal data processing in Matomo

Conclusion

If you’ve successfully followed the steps in this guide then your website will now have both Complianz and Matomo working together on your WordPress site, with Complianz managing all visitor consent and the Matomo JavaScript tracker only tracking visitors who have given consent to be tracked.

Previous FAQ: Using Klaro Consent Manager with Matomo