Using Complianz for WordPress Consent Manager with Matomo
Introduction
Complianz – GDPR/CCPA Cookie Consent is a highly-rated WordPress plugin that supports third party blocking, auto-detection/configuration of plugins and handles consent requirements for different countries based on visitor geo-location. The Complianz consent manager includes a step-by-step setup wizard that makes configuration quick and easy and it offers built-in support for Matomo.
This step-by-step guide will show you 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 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 be installed and activated.
Step 1) Activate the Complianz consent manager when your site is setup with Matomo
- 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.
Add Matomo to your site when the Complianz consent manager is already configured
- After activating and configuring the Matomo plugin, navigate to the Complianz menu > Wizard > Consent.
- Scan for cookies and choose Save and Continue.
- Work through the steps as described above, Activate the Complianz consent manager when your site is setup with Matomo.
Step 2) Configure the Matomo Tracker consent mode
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 the Complianz consent manager 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 cookies, follow these steps:
- Navigate to the Complianz menu > Wizard > Consent.
- For Statistics, answer Yes to Use cookieless tracking?
- For Statistics, 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.
- If you are using the Matomo for WordPress plugin, then the URL for your Matomo installation will be:
- 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, navigate to the Matomo Analytics menu > Settings and change the Add tracking code option to Disabled.
- 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 the Complianz consent manager and Matomo working together on your WordPress site. Complianz will manage all visitor consent and the Matomo JavaScript tracker only track visitors who have given consent to be tracked.