Skip to documentation content

Matomo

Give and withdraw Matomo cookie consent from the analytics category.

What it does. Uses Matomo's own cookie consent API so Matomo decides what to stop doing, rather than blocking its script outright.

Consent category. analytics.

How it works

On each consent update the bridge pushes one of two commands onto Matomo's queue:

_paq.push(['setCookieConsentGiven']);
_paq.push(['forgetCookieConsentGiven']);

The first runs when analytics is granted, the second when it isn't. As with HubSpot, _paq is created as an array if it doesn't exist yet.

This works well with Matomo's requireCookieConsent setting. Matomo tracks without cookies until consent arrives, then starts using them, so you keep aggregate measurement for visitors who decline without setting anything on their device.

Setup

On by default. Toggle it under Vendor Consent Signals, then publish.

Testing

Accept analytics and confirm the _pk_id and _pk_ses cookies appear. Withdraw consent through the preferences modal and confirm Matomo drops them. The queue is inspectable at:

window._paq