Connecting OneTrust to Matomo
OneTrust sits upstream of every tag on the site, which makes it the single system most able to change your conversion volume overnight without anybody touching a tag. Matomo can be self-hosted with no third party in the chain, which makes it the one analytics destination where the data genuinely never leaves infrastructure you control. The join between them succeeds or fails on one thing: whether the first-party visitor ID reaches the OneTrust consent record before the conversion happens, because Matomo can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
OneTrust and Matomo: cookieless until consent, then remember it
Use Matomo's consent functions: requireCookieConsent tracks cookieless until rememberCookieConsentGiven runs from OneTrust's analytics callback, while requireConsent sends nothing until consent; counsel picks per region. Report consent rate beside returning-visitor metrics. For server-side ecommerce orders through the HTTP Tracking API, store consent with each order and decide what each state may send.
Matomo has its own consent functions, and they fit OneTrust better than blocking the tag outright. requireCookieConsent lets Matomo track without cookies until consent, then rememberCookieConsentGiven switches it to cookie-based visitor IDs once OneTrust's callback reports the analytics category granted. requireConsent is stricter and sends nothing until consent. Which one you may use depends on counsel's view of cookieless analytics in each region you serve.
The cookieless phase costs returning-visitor accuracy, not volume. Every page is still counted, but a visitor who never accepts looks new on each visit, so new-versus-returning and multi-visit attribution skew toward first touch. Report the consent rate next to those metrics so nobody reads the skew as a change in audience.
Ecommerce orders posted server-side through the HTTP Tracking API from your order system bypass the banner, so store the consent state with the order and decide what each state is allowed to send, and whether an unconsented order goes in without a visitor ID. A self-hosted Matomo keeps everything on your infrastructure, but that changes who processes the data, not whether you need permission to track a person.
OneTrust → Matomo · what breaks
Why this join usually fails — OneTrust → Matomo
- 01
The first-party visitor ID never reaches OneTrust
The identifier can only be captured after consent is given, so a visitor who consents on the second page has already lost the parameter from the first.
- 02
A governance change that looks like broken tracking
A privacy team tightens a banner on a Tuesday and a fifth of conversions disappear. The marketing team spends a week debugging tags that are working exactly as configured, because nobody connects the two systems.
- 03
Owning the pipeline means owning the outage
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
- 04
Nothing reconciles afterwards
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
OneTrust → Matomo · the fix
What working looks like — OneTrust → Matomo
The first-party visitor ID on every consent record
Conversions arriving in Matomo
The event lands in your own database and is queryable directly, including the raw log, which most analytics products do not expose.
Reconciled against the source
OneTrust → Matomo · architecture
How OneTrust and Matomo actually connect
- 1
OneTrust holds the truth
Consent is not a tracking detail, it is the gate. A conversion from a visitor who declined cannot lawfully be sent to an ad platform, and the share who decline is the ceiling on everything you report.
- 2
Matomo needs a click to match
The site ID, the visitor identifier and the event or ecommerce order. Self-hosted instances additionally need the tracker endpoint reachable and the database keeping up, which hosted tools do not fail at.
- 3
The identifier is the bridge
The first-party visitor ID, captured at the visit and carried into the OneTrust consent record.
- 4
The event source decides reliability
Send only conversions where consent for advertising purposes was actually granted, and report the unconsented share as a stated number rather than a gap.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
OneTrust → Matomo · normal or broken
Working vs. broken, side by side — OneTrust → Matomo
Normal, not a fault
The first-party visitor ID present on the consent record
Sent from your order system, gated on the consent record
Deduplicated correctly
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Reconciles with the source
Actually broken
The first-party visitor ID missing on most records
The identifier can only be captured after consent is given, so a visitor who consents on the second page has already lost the parameter from the first.
Sent from the browser
A privacy team tightens a banner on a Tuesday and a fifth of conversions disappear. The marketing team spends a week debugging tags that are working exactly as configured, because nobody connects the two systems.
Counted twice, or not at all
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
Nobody has reconciled it
OneTrust → Matomo · diagnose
Diagnostic order — OneTrust → Matomo
- 01
Count consent records carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Correlate conversion drops against the consent change log first
Before touching a tag. In governed environments this explains the drop more often than any technical fault does.
- 04
Check tracker reachability and database lag before debugging any tag
On self-hosted analytics the answer is infrastructure more often than instrumentation.
- 05
Read the match rate, not the success message
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
OneTrust → Matomo · prove
How it gets proven — OneTrust → Matomo
Source of truth
Your order or CRM system, with the consent state at the time of the event recorded alongside.
- The first-party visitor ID confirmed present on a live consent record.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Consented conversions reconciled against imported figures, with the consent rate stated explicitly in the report.
OneTrust → Matomo · free audit
What we check in the free audit
- Count consent records carrying the first-party visitor ID
- Follow one real conversion end to end
- Correlate conversion drops against the consent change log first
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Your order or CRM system, with the consent state at the time of the event recorded alongside.
Free30 minutesNo obligation
OneTrust → Matomo · when not to buy
When you don't need this — OneTrust → Matomo
- Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry the first-party visitor ID.
- If your consent rate is very low, improving the banner experience will do more for your reporting than any tracking build — and that is a design and legal conversation, not a tagging one.
- If you have no privacy or ownership requirement and no team to run it, a hosted product removes the only real cost of this one.
OneTrust → Matomo · what we deliver
What gets built — OneTrust → Matomo
Identifier capture into OneTrust
Capture into a pending buffer on landing and only persist and dispatch once consent is recorded — never the reverse, and never 'capture now, ask later'.
Event source: your order system, gated on the consent record
Send only conversions where consent for advertising purposes was actually granted, and report the unconsented share as a stated number rather than a gap.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Withdrawal of consent should stop future sends and, where the platform supports it, trigger a deletion request.
Written guarantee
95%+ tracking accuracy
Measured against Your order or CRM system, with the consent state at the time of the event recorded alongside.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
OneTrust → Matomo questions, answered
Matomo can be configured to track without cookies until consent is given. Whether that is allowed without asking depends on jurisdiction, so get a legal view per region rather than assuming.
In OneTrust's OptanonWrapper callback or on the OneTrustGroupsUpdated event, check whether the analytics group is active and call Matomo's consent-given function; call the forget function when consent is withdrawn.
Almost always because the first-party visitor ID never reached the OneTrust consent record. The identifier can only be captured after consent is given, so a visitor who consents on the second page has already lost the parameter from the first. Measure coverage before debugging the dispatch.
Matomo sets its own first-party cookie and, when self-hosted on your domain, is not a third-party request at all. That means ad blockers and browser tracking-prevention affect it far less than a hosted analytics tag — one of the few genuine measurement advantages available under current privacy conditions.
Your order system, gated on the consent record. Send only conversions where consent for advertising purposes was actually granted, and report the unconsented share as a stated number rather than a gap.
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
More on OneTrust → Matomo
- Stripe → MatomoConnecting Stripe to Matomo
- PayPal → MatomoConnecting PayPal to Matomo
- Shopify → MatomoConnecting Shopify to Matomo
RELATED GUIDES
Where OneTrust → Matomo fits in the rest of your tracking
- CookieYes → MatomoConnecting CookieYes to Matomo
- Usercentrics → MatomoConnecting Usercentrics to Matomo
- Termly → MatomoConnecting Termly to Matomo
- OneTrust → Adobe AnalyticsConnecting OneTrust to Adobe Analytics
- OneTrust → GA4Connecting OneTrust to GA4
- EcommerceConversion tracking for ecommerce brands, measured against your orders
- Complianz → MatomoConnecting Complianz to Matomo
- iubenda → MatomoConnecting iubenda to Matomo
Free · 30 min
Get OneTrust and Matomo joined properly
Free30 minutesNo obligation
