Connecting Braintree to Matomo
Braintree is a payment gateway rather than a storefront, so it sits underneath whatever is taking the order and holds the transaction itself. 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 Braintree transaction 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
Braintree orders in Matomo with the visitor ID on the transaction
Read the Matomo visitor ID at checkout, send it with the payment method nonce, and store it in a Braintree custom field or your order record. On settlement, post the ecommerce order through the HTTP Tracking API with that visitor ID, order ID, revenue and line items. Matomo won't reverse refunds, and each site holds one currency.
Matomo ecommerce tracking usually records the order on the confirmation page, which with Braintree misses PayPal and Venmo payers who do not come back and counts card payments that later fail settlement. A Matomo instance can instead take the order server-side through the HTTP Tracking API from your order system, which is the cleaner source; the question is how the order finds its visitor.
Read the Matomo visitor ID in the browser at checkout, send it to your server with the payment method nonce, and store it in a Braintree custom field or on your order record. When the transaction settles, post the ecommerce order with that visitor ID, your order ID, the revenue and the line items. If the confirmation-page tag also records the order, use the same order ID in both and Matomo keeps the first.
Matomo's ecommerce reports do not reverse an order when you refund it, so plan for that: track refunds and lost disputes as a separate event with their value, or adjust revenue in your own reporting from Braintree data. Currency is the other check. A Matomo site has one currency setting, and if your Braintree merchant accounts settle in several currencies, convert before sending or track each market as its own site.
Braintree → Matomo · what breaks
Why this join usually fails — Braintree → Matomo
- 01
The first-party visitor ID never reaches Braintree
Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.
- 02
A gateway that knows nothing about marketing
Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.
- 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.
Braintree → Matomo · the fix
What working looks like — Braintree → Matomo
The first-party visitor ID on every transaction
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
Braintree → Matomo · architecture
How Braintree and Matomo actually connect
- 1
Braintree holds the truth
Settled and authorised are different states. Authorisation reserves the funds; settlement is money moving, and reporting on the wrong one produces a persistent gap against your bank.
- 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 Braintree transaction.
- 4
The event source decides reliability
Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Braintree → Matomo · normal or broken
Working vs. broken, side by side — Braintree → Matomo
Normal, not a fault
The first-party visitor ID present on the transaction
Sent from the Braintree transaction settlement webhook
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
Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.
Sent from the browser
Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.
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
Braintree → Matomo · diagnose
Diagnostic order — Braintree → Matomo
- 01
Count transactions carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Open a settled transaction and check its custom fields
If the identifier is not there, your application never attached it and nothing downstream can recover it.
- 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.
Braintree → Matomo · prove
How it gets proven — Braintree → Matomo
Source of truth
Braintree's transaction records, filtered to settled, for the same window.
- The first-party visitor ID confirmed present on a live transaction.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- A PayPal-funded transaction confirmed to report even though the buyer was redirected away.
Braintree → Matomo · free audit
What we check in the free audit
- Count transactions carrying the first-party visitor ID
- Follow one real conversion end to end
- Open a settled transaction and check its custom fields
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Braintree's transaction records, filtered to settled, for the same window.
Free30 minutesNo obligation
Braintree → Matomo · when not to buy
When you don't need this — Braintree → Matomo
- Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the first-party visitor ID.
- If your platform already reports orders accurately and Braintree is purely the funding rail, work at the order layer instead — it is closer to the customer.
- 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.
Braintree → Matomo · what we deliver
What gets built — Braintree → Matomo
Identifier capture into Braintree
Pass the click identifier into the transaction's custom fields when your server creates the charge. Braintree preserves them and they survive to the webhook and to any later refund.
Event source: the Braintree transaction settlement webhook
Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Braintree exposes refunds and disputes, both carrying the original custom fields, so reversals are straightforward.
Written guarantee
95%+ tracking accuracy
Measured against Braintree's transaction records, filtered to settled, for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Braintree → Matomo questions, answered
Post the order server-side through Matomo's HTTP Tracking API once the Braintree transaction settles, using the visitor ID you stored at checkout. The confirmation-page tag misses buyers who never return.
Not by reversing the order. Track refunds as a separate event or adjust revenue in your own reporting.
Almost always because the first-party visitor ID never reached the Braintree transaction. Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all. 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.
The Braintree transaction settlement webhook. Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
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 Braintree → Matomo
- Braintree → Google AdsConnecting Braintree to Google Ads
- Braintree → MetaConnecting Braintree to Meta Conversions API
- Braintree → GA4Connecting Braintree to GA4
RELATED GUIDES
Where Braintree → Matomo fits in the rest of your tracking
- Medusa → MatomoConnecting Medusa to Matomo
- Wix → MatomoConnecting Wix Stores to Matomo
- Ecwid → MatomoConnecting Ecwid to Matomo
- Braintree → AmplitudeConnecting Braintree to Amplitude
- Braintree → Adobe AnalyticsConnecting Braintree to Adobe Analytics
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- PrestaShop → MatomoConnecting PrestaShop to Matomo
- Saleor → MatomoConnecting Saleor to Matomo
Free · 30 min
Get Braintree and Matomo joined properly
Free30 minutesNo obligation
