GDPRChecker

Home / Knowledge Base / How to Add Matomo to Your Cookie Banner: A 3-Step Tutorial for GDPR Compliance

Website Compliance

How to Add Matomo to Your Cookie Banner: A 3-Step Tutorial for GDPR Compliance

A practical 3-step tutorial on integrating Matomo analytics with your cookie banner for GDPR compliance. Covers configuration, CMP integration, verification with GDPRChecker, common mistakes, and a comparison with Google Consent Mode v2.

Author

GDPRChecker Editorial Team

Reviewed by

Privacy & Compliance Research Team

Last updated

August 2026

Reading time

9 min read

Educational guidance for compliance readiness — not legal advice. Requirements vary by jurisdiction and your specific processing activities.

Introduction

*Updated for 2026 compliance practices.*

Integrating Matomo analytics with your cookie consent banner is a critical step for GDPR-compliant tracking. This practical guide explains **how to add Matomo to your cookie banner in a 3-step tutorial**, ensuring that you respect user consent choices while maintaining accurate analytics. We’ll cover the technical implementation, common pitfalls, and how to verify your setup using GDPRChecker’s scanning tools. Remember, this guide provides technical implementation guidance, not legal advice. For official requirements, consult the European Data Protection Board and GDPR.eu.

How to Validate Your Setup with GDPRChecker

GDPRChecker’s scanning tools help you verify that your Matomo integration is compliant. Here’s how:

  1. **Run a public scan**: Enter your website URL to check for pre-consent network requests. The scanner will flag any requests to Matomo that occur before consent.
  2. **Test banner behavior**: Interact with your cookie banner and observe whether Matomo requests are blocked or allowed accordingly.
  3. **Review the cookie inventory**: GDPRChecker lists all cookies set by your site, including Matomo’s `_pk_id` and `_pk_ses`. Ensure they are categorized correctly and only set after consent.
  4. **Check for disclosure gaps**: The scanner verifies that your privacy policy mentions Matomo and explains its purpose.

After making changes, re-scan to confirm the issues are resolved. For ongoing monitoring, consider GDPRChecker’s paid plans, which offer runtime protection and consent records.

Implementation Checklist

Use this checklist to ensure your Matomo cookie banner integration is complete:

  1. Add `_paq.push(['requireConsent'])` or `_paq.push(['requireCookieConsent'])` to your Matomo tracking code.
  2. Configure your CMP to call `_paq.push(['rememberConsentGiven'])` on accept.
  3. Configure your CMP to call `_paq.push(['forgetConsentGiven'])` on revoke.
  4. Test that no Matomo cookies are set before consent (check `_pk_id`, `_pk_ses`).
  5. Verify that Matomo tracking requests are sent only after consent.
  6. If using cookie-less fallback, confirm that IP anonymization is enabled.
  7. Update your privacy policy to disclose Matomo usage and data retention.
  8. Run a GDPRChecker scan to identify any pre-consent requests or missing disclosures.
  9. Test the reject flow: ensure that declining cookies stops all Matomo tracking.
  10. Document your consent configuration for audit purposes.
  11. Schedule regular re-scans (e.g., monthly) to catch configuration drift.
  12. If using Google Consent Mode alongside Matomo, ensure no conflicts in consent signals.

FAQ

What is "how to add matomo to your cookie banner 3 step tutorial"? It’s a practical guide for website owners to integrate Matomo analytics with a cookie consent banner in three steps: configuring Matomo’s consent requirements, connecting it to the banner via JavaScript, and verifying the setup. This ensures GDPR-compliant tracking by respecting user consent choices.

Do I need to add Matomo to my cookie banner for GDPR? Yes, if Matomo sets cookies or processes personal data (like IP addresses), you must obtain prior consent under the ePrivacy Directive and GDPR. Integrating Matomo with your banner ensures that tracking only occurs after the user gives explicit consent.

How do I implement adding Matomo to my cookie banner? Implement by adding `_paq.push(['requireConsent'])` to your Matomo code, then use your CMP’s callbacks to trigger `rememberConsentGiven` or `forgetConsentGiven` based on user choices. Test thoroughly to confirm that tracking is blocked until consent is granted.

How can I verify my Matomo cookie banner setup with a scanner? Use GDPRChecker’s public scanner to check for pre-consent network requests to Matomo, verify cookie categories, and ensure your privacy policy discloses Matomo. Re-scan after changes to confirm compliance.

What are common mistakes when adding Matomo to a cookie banner? Common mistakes include forgetting to call `requireConsent`, not handling consent revocation, assuming self-hosted Matomo is exempt, misconfiguring tag managers, and neglecting to anonymize data when consent is denied. These can lead to unintentional tracking and non-compliance.

Which cookies and trackers should I check for Matomo integration? Check for Matomo’s first-party cookies: `_pk_id` (visitor ID), `_pk_ses` (session), and any custom cookies. Also monitor network requests to your Matomo endpoint. GDPRChecker’s cookie inventory can help identify these.

How often should I review my Matomo cookie banner integration? Review your integration at least quarterly, or whenever you update your CMP, Matomo, or privacy policy. Regular GDPRChecker scans can detect configuration drift, such as new trackers or broken consent flows.

What evidence should I keep for Matomo cookie banner compliance? Keep records of your consent configuration (screenshots of settings), consent logs from your CMP, Matomo’s tracking settings, and GDPRChecker scan reports. This documentation demonstrates your compliance efforts to regulators.

Conclusion

Adding Matomo to your cookie banner is a straightforward but essential task for GDPR compliance. By following this 3-step tutorial—configuring Matomo, integrating with your banner, and verifying with tools like GDPRChecker—you can ensure that your analytics respect user privacy. Remember to avoid common mistakes, test thoroughly, and maintain documentation. For a complete compliance check, run a free scan at GDPRChecker today and close any consent gaps.

Article schema

```json { "@context": "https://schema.org", "@type": "Article", "headline": "How to Add Matomo to Your Cookie Banner: A 3-Step Tutorial for GDPR Compliance", "description": "Learn how to add Matomo to your cookie banner in 3 steps for GDPR compliance. Step-by-step guide with verification, common mistakes, and a scanner CTA.", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.gdprchecker.online/guides/how-to-add-matomo-to-your-cookie-banner-3-step-tutorial" }, "publisher": { "@type": "Organization", "name": "GDPRChecker", "url": "https://www.gdprchecker.online" } } ```

GDPRChecker guides are educational resources and do not constitute legal advice. Use them to understand technical and operational privacy requirements, and consult qualified counsel for legal interpretation.

Check Your Website in Under 60 Seconds

  • No signup required
  • GDPR-focused checks
  • Cookie banner detection
  • Privacy policy verification