Connecting Xero to Matomo
Xero holds the invoice and the reconciliation, which makes it the definitive revenue record for many service and trade businesses. 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 Xero invoice 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
Xero paid invoices as backdated Matomo ecommerce orders
Store the Matomo visitor ID in a hidden field on the inquiry form, keep it on the job, and when Xero marks the invoice paid, post an ecommerce order through the HTTP Tracking API with that visitor ID, the InvoiceID as order ID and the subtotal. Backdated hits need an authenticated token and archive invalidation.
Matomo can hold Xero revenue as ecommerce orders against the visitor who produced the lead, with more control than most hosted analytics allows. Store the Matomo visitor ID in a hidden field when the inquiry form is submitted, keep it on the job or deal, and when Xero marks the invoice paid, post an ecommerce order through the HTTP Tracking API with that visitor ID, the InvoiceID as order ID and the subtotal as revenue.
Late revenue is the Matomo-specific complication. To place the order with the visit that produced the lead, the hit has to carry a timestamp from that period, and Matomo only accepts timestamps older than a day with an authenticated token. Reports for those days were already archived, so the order will not appear until those archives are invalidated and rebuilt. Schedule the invalidation, or the revenue sits in the raw log and never reaches the reports.
Credit notes need a decision. Check whether your Matomo version can adjust or remove a recorded order; if not, report credit notes as a separate goal so a refunded job can be netted out. On a self-hosted instance the raw ecommerce data is yours, so a direct correction is possible, but document it, or the next person to reconcile Matomo against Xero will find an unexplained gap.
Xero → Matomo · what breaks
Why this join usually fails — Xero → Matomo
- 01
The first-party visitor ID never reaches Xero
Like any accounting system, Xero has no marketing context of its own. The identifier must be written onto the contact record by whatever creates it, and in many businesses that is a manual step which will be applied inconsistently unless it is automated.
- 02
Payment terms separating the sale from the money
An invoice issued in March and paid in May is one sale and two dates. Which one the conversion uses has to be a decision rather than an accident.
- 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.
Xero → Matomo · the fix
What working looks like — Xero → Matomo
The first-party visitor ID on every invoice
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
Xero → Matomo · architecture
How Xero and Matomo actually connect
- 1
Xero holds the truth
Xero's bank reconciliation is what makes it unusually trustworthy as a source of truth — an invoice marked paid and reconciled is money that actually arrived, which is a stronger guarantee than most systems offer.
- 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 Xero invoice.
- 4
The event source decides reliability
Fire on payment, not on invoice issue. Trade businesses on thirty-day terms will otherwise report revenue a month before it exists.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Xero → Matomo · normal or broken
Working vs. broken, side by side — Xero → Matomo
Normal, not a fault
The first-party visitor ID present on the invoice
Sent from the Xero invoice payment 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
Like any accounting system, Xero has no marketing context of its own. The identifier must be written onto the contact record by whatever creates it, and in many businesses that is a manual step which will be applied inconsistently unless it is automated.
Sent from the browser
An invoice issued in March and paid in May is one sale and two dates. Which one the conversion uses has to be a decision rather than an accident.
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
Xero → Matomo · diagnose
Diagnostic order — Xero → Matomo
- 01
Count invoices carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Check whether the conversion fires on issue or on payment
On terms-based businesses this single choice moves the numbers by a full billing cycle.
- 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.
Xero → Matomo · prove
How it gets proven — Xero → Matomo
Source of truth
Xero's paid invoices by payment date, reconciled against the bank feed.
- The first-party visitor ID confirmed present on a live invoice.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- A paid invoice confirmed reconciled against the bank feed before being counted.
Xero → Matomo · free audit
What we check in the free audit
- Count invoices carrying the first-party visitor ID
- Follow one real conversion end to end
- Check whether the conversion fires on issue or on payment
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Xero's paid invoices by payment date, reconciled against the bank feed.
Free30 minutesNo obligation
Xero → Matomo · when not to buy
When you don't need this — Xero → Matomo
- Measure identifier coverage yourself first — pull your last hundred invoices and count how many carry the first-party visitor ID.
- If your work is paid at point of sale with no invoicing, the accounting system is not where the conversion should come from.
- 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.
Xero → Matomo · what we deliver
What gets built — Xero → Matomo
Identifier capture into Xero
Write the click identifier to a tracking category or a custom field on the Xero contact at creation, so subsequent invoices inherit the association.
Event source: the Xero invoice payment webhook
Fire on payment, not on invoice issue. Trade businesses on thirty-day terms will otherwise report revenue a month before it exists.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Credit notes reverse against the original invoice and should reduce the reported figure.
Written guarantee
95%+ tracking accuracy
Measured against Xero's paid invoices by payment date, reconciled against the bank feed.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Xero → Matomo questions, answered
Yes, by sending paid invoices through the HTTP Tracking API as ecommerce orders, using a visitor ID stored when the lead converted. Backdated hits need a token and archive invalidation.
Usually because the hits were backdated into days whose reports had already been archived. Invalidate those dates so Matomo reprocesses them.
Almost always because the first-party visitor ID never reached the Xero invoice. Like any accounting system, Xero has no marketing context of its own. The identifier must be written onto the contact record by whatever creates it, and in many businesses that is a manual step which will be applied inconsistently unless it is automated. 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 Xero invoice payment webhook. Fire on payment, not on invoice issue. Trade businesses on thirty-day terms will otherwise report revenue a month before it exists.
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 Xero → Matomo
- Xero → Google AdsConnecting Xero to Google Ads
- Xero → MetaConnecting Xero to Meta Conversions API
- Xero → GA4Connecting Xero to GA4
RELATED GUIDES
Where Xero → Matomo fits in the rest of your tracking
- Harvest → MatomoConnecting Harvest to Matomo
- Wave → MatomoConnecting Wave to Matomo
- QuickBooks → MatomoConnecting QuickBooks to Matomo
- Xero → GA4Connecting Xero to GA4
- Xero → Adobe AnalyticsConnecting Xero to Adobe Analytics
- BookkeepingConversion tracking for bookkeeping firms, valued on the retainer not the enquiry
- BILL → MatomoConnecting BILL to Matomo
- FreshBooks → MatomoConnecting FreshBooks to Matomo
Free · 30 min
Get Xero and Matomo joined properly
Free30 minutesNo obligation
