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:
- **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.
- **Test banner behavior**: Interact with your cookie banner and observe whether Matomo requests are blocked or allowed accordingly.
- **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.
- **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.
Comparison: Matomo Consent Modes vs. Google Consent Mode v2
While both Matomo and Google Analytics offer consent-aware tracking, their approaches differ. Here’s a comparison:
| Feature | Matomo Consent Management | Google Consent Mode v2 | |---------|---------------------------|------------------------| | **Consent signals** | Custom JavaScript API (`requireConsent`, `rememberConsentGiven`) | Google-defined consent types (`ad_storage`, `analytics_storage`) | | **Cookie-less tracking** | Built-in support via configurable tracking | Limited to modeled data for gaps | | **Self-hosting** | Fully self-hosted option | Not available for GA4 | | **Integration with CMPs** | Manual integration via callbacks | Standardized via TCF or Google CMP Partner program | | **Compliance flexibility** | Fine-grained control over data collection | Relies on Google’s compliance framework |
For a deeper dive into Google’s approach, see our Consent Mode v2 vs. Google Certified CMP guide.
Implementation Checklist
Use this checklist to ensure your Matomo cookie banner integration is complete:
- Add `_paq.push(['requireConsent'])` or `_paq.push(['requireCookieConsent'])` to your Matomo tracking code.
- Configure your CMP to call `_paq.push(['rememberConsentGiven'])` on accept.
- Configure your CMP to call `_paq.push(['forgetConsentGiven'])` on revoke.
- Test that no Matomo cookies are set before consent (check `_pk_id`, `_pk_ses`).
- Verify that Matomo tracking requests are sent only after consent.
- If using cookie-less fallback, confirm that IP anonymization is enabled.
- Update your privacy policy to disclose Matomo usage and data retention.
- Run a GDPRChecker scan to identify any pre-consent requests or missing disclosures.
- Test the reject flow: ensure that declining cookies stops all Matomo tracking.
- Document your consent configuration for audit purposes.
- Schedule regular re-scans (e.g., monthly) to catch configuration drift.
- 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" } } ```
Copyright and editorial notice
© GDPRChecker
This original AI-assisted editorial draft was selected, reviewed, and published by GDPRChecker. All rights are reserved where protected by applicable law. Do not reproduce the article without permission.