Omea Consent Pro · Guides

Matomo cookie consent on WordPress, cookieless first

Add Matomo to WordPress with Omea Consent Pro: count every visit without cookies, add cookies after Statistics consent – or never, or only after consent.

Updated · Omea Consent Pro 1.0.8

On this page
  1. Add Matomo
  2. The three cookie options
  3. When a visitor changes their mind
  4. Matomo cookies in your cookie list
  5. Send conversions to Matomo
  6. Good to know

Omea Consent Pro 1.0.8 adds Matomo as a one-click integration. By default Matomo loads right away without cookies, so every visit is counted, and it adds its cookies only once the visitor accepts Statistics. You can also tell it to never use cookies, or to load only after consent. Self-hosted Matomo and Matomo Cloud both work.

Add Matomo

  1. Open Integrations Go to Omea Consent › Integrations and find Matomo under Analytics.
  2. Switch it on Turn on the switch in the Matomo card header.
  3. Enter the Site ID and address Paste the Site ID (Matomo › Administration › Websites › Manage) and the Matomo address – your own server, such as https://analytics.example.com/, or https://example.matomo.cloud/.
  4. Choose how Matomo uses cookies Keep the recommended Count every visit without cookies, add cookies after Statistics consent, or pick one of the other two options.
  5. Remove the old Matomo code Delete any other Matomo tracking code – under Scripts, in your theme or in another plugin – so visits aren’t counted twice.
  6. Save Click Save changes in the top bar.

If the address isn’t a valid https:// address, Matomo isn’t switched on and the screen says so. You can paste the tracker file too – …/matomo.php, …/matomo.js or …/piwik.php are trimmed to the Matomo address.

Option Before a choice After Accept (Statistics) After Reject Card badge
Count every visit without cookies, add cookies after Statistics consent (recommended) Counted, no cookies Counted with cookies Counted, no cookies Cookies after consent
Never use cookies – count every visit without them Counted, no cookies Counted, no cookies Counted, no cookies No cookies
Load only after Statistics consent (strictest) Not loaded Counted with cookies Not loaded After Statistics consent

The default uses Matomo’s own cookie consent (requireCookieConsent): the tracker sends hits straight away and sets _pk_id and _pk_ses only after it’s told consent was given. Never use cookies uses disableCookies. Both are described in Matomo’s tracking consent guide.

Without cookies, Matomo can’t recognise a returning visitor or join the pages of a visit as reliably, so expect more “new” visitors. With cookies, returning visitors are recognised.

Matomo follows the Statistics category, not Marketing. A visitor who accepts only Statistics gets Matomo cookies but no ad pixels.

When a visitor changes their mind

  • Accepts after browsing a while (default mode): Matomo is told at once, on the same page, and can set its cookies from then on.
  • Withdraws Statistics (through the cookie settings link): Matomo deletes its cookies (forgetCookieConsentGiven). In the default mode it keeps counting without them; in Load only after Statistics consent it stops loading from the next page.

While Matomo may set cookies – the default and Load only after Statistics consent – Omea Consent Pro declares them to the WP Consent API under Statistics:

Cookie Lifetime Purpose
_pk_id 13 months Recognises a returning visitor in this site’s Matomo statistics.
_pk_ses 30 minutes Keeps the pages of one visit together in this site’s Matomo statistics.

With Never use cookies nothing is declared, because Matomo sets none.

Send conversions to Matomo

Once Matomo is switched on, conversions get a Matomo field in their destinations:

  • A goal ID (from Matomo › Goals › Manage) tracks that goal. If the conversion has a value, it’s sent as revenue.
  • event sends a Matomo event in category Conversions, with the conversion name as the action and the page path as the name.

A conversion goes to Matomo only when Matomo is loaded – so in Load only after Statistics consent, only after the visitor accepts.

Good to know

  • Remove other Matomo code. The Pro setup doesn’t move a Matomo snippet out of Scripts for you. Running both counts every visit twice.
  • Privacy policy. Without cookies Matomo still receives the visitor’s IP address and browser details to count the visit. Mention Matomo in your privacy policy, and consider IP anonymisation in Matomo’s privacy settings.
  • Whether cookieless counting needs consent depends on the country and on your legal advice. If you’re told analytics must wait for consent, choose Load only after Statistics consent.
  • Admins and hidden roles. Like every integration, Matomo doesn’t load in the WordPress admin or for roles hidden with Hide banner for roles.
  • Want analytics in your own WordPress database instead? See Omea Analytics, which uses the same cookieless-first model.

Frequently asked questions

Does Omea Consent Pro work with Matomo Cloud?

Yes. Enter your Matomo Cloud address, such as https://example.matomo.cloud/, as the Matomo address. Self-hosted Matomo works the same way.

Which consent category does Matomo use?

Statistics. Ad platforms follow Marketing consent; Matomo follows Statistics only.

What happens when a visitor rejects Statistics?

In the default mode Matomo keeps counting the visit without cookies. In Load only after Statistics consent nothing loads.

Can I send conversions to Matomo?

Yes. In a conversion’s destinations, enter a Matomo goal ID to track that goal (the value is sent as revenue), or event to send an event in category Conversions.

Does cookieless Matomo still need a privacy policy mention?

Yes. Without cookies Matomo still receives the visitor’s IP address and browser details to count the visit, so name Matomo in your privacy policy.