Connecting Chargebee to Matomo
Chargebee is a billing system, so it holds the only complete record of what a subscription business earned — and it sits entirely outside the browser. 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 Chargebee subscription 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
Chargebee payments as Matomo ecommerce orders
Store Matomo's visitor ID on the Chargebee customer at signup, then send payment_succeeded through Matomo's HTTP Tracking API with that ID, the amount and the invoice ID as order ID. Set User ID to your account ID at login so devices merge. Record first payment as an ecommerce order, and renewals as a separate goal or not at all.
Matomo sees the visit where someone started a trial but loses them at Chargebee's hosted checkout, which runs on another domain. To get paid conversions into the same reports, store Matomo's visitor ID on the Chargebee customer at signup, in a custom field, and send the payment through Matomo's HTTP Tracking API when payment_succeeded fires, with that visitor ID, the amount and the Chargebee invoice ID as the order ID.
Use Matomo's User ID with your own account ID once the user logs in. Trials are long, the user returns on different devices, and the User ID is what keeps the visit that started the trial, the visits during it and the payment under one person. Without it, the payment attaches to whatever visitor ID was stored, which may be a laptop the user never used again.
Decide what a renewal is. Recording every monthly charge as an ecommerce order makes Matomo's revenue by channel report the lifetime billing of old campaigns, which is rarely what anyone wants from it. A common split is first payment as an ecommerce order, renewals as a separate goal or not sent, and refunds handled in billing reports rather than in Matomo, which has no clean way to subtract an order.
Chargebee → Matomo · what breaks
Why this join usually fails — Chargebee → Matomo
- 01
The first-party visitor ID never reaches Chargebee
The identifier must live on the customer or subscription so it survives a trial period that is longer than any browser cookie you can rely on. Chargebee's hosted checkout is also a different origin, so nothing crosses it by default.
- 02
Trials longer than any cookie
The gap between signup and first payment is where the identifier has to survive, and it is measured in weeks. Browser storage will not do it.
- 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.
Chargebee → Matomo · the fix
What working looks like — Chargebee → Matomo
The first-party visitor ID on every subscription
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
Chargebee → Matomo · architecture
How Chargebee and Matomo actually connect
- 1
Chargebee holds the truth
The distinction that matters most here is invoice generated versus payment succeeded. An invoice is a bill you sent; a payment is money you received, and in any business with dunning the gap between them is large.
- 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 Chargebee subscription.
- 4
The event source decides reliability
Fire on payment succeeded, not invoice generated, and key the conversion on the billing period so a dunning sequence with four retries produces one conversion rather than four.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Chargebee → Matomo · normal or broken
Working vs. broken, side by side — Chargebee → Matomo
Normal, not a fault
The first-party visitor ID present on the subscription
Sent from the Chargebee payment_succeeded 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
The identifier must live on the customer or subscription so it survives a trial period that is longer than any browser cookie you can rely on. Chargebee's hosted checkout is also a different origin, so nothing crosses it by default.
Sent from the browser
The gap between signup and first payment is where the identifier has to survive, and it is measured in weeks. Browser storage will not do it.
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
Chargebee → Matomo · diagnose
Diagnostic order — Chargebee → Matomo
- 01
Count subscriptions carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Check whether the event fires on invoice or on payment
Invoice-based firing counts money you have not received, and in a business with dunning that overstates consistently.
- 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.
Chargebee → Matomo · prove
How it gets proven — Chargebee → Matomo
Source of truth
Chargebee's paid invoices by payment date, net of refunds and failed payments.
- The first-party visitor ID confirmed present on a live subscription.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- A dunning sequence confirmed to produce one conversion rather than one per retry.
Chargebee → Matomo · free audit
What we check in the free audit
- Count subscriptions carrying the first-party visitor ID
- Follow one real conversion end to end
- Check whether the event fires on invoice or on payment
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Chargebee's paid invoices by payment date, net of refunds and failed payments.
Free30 minutesNo obligation
Chargebee → Matomo · when not to buy
When you don't need this — Chargebee → Matomo
- Measure identifier coverage yourself first — pull your last hundred subscriptions and count how many carry the first-party visitor ID.
- If your trial is longer than 90 days, uploading the first payment against the original click cannot work — we will tell you that before quoting.
- 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.
Chargebee → Matomo · what we deliver
What gets built — Chargebee → Matomo
Identifier capture into Chargebee
Write the click identifier to a custom field on the Chargebee customer or subscription when the subscription is created, server-side, rather than relying on the hosted checkout page to carry it.
Event source: the Chargebee payment_succeeded webhook
Fire on payment succeeded, not invoice generated, and key the conversion on the billing period so a dunning sequence with four retries produces one conversion rather than four.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Cancellations and refunds are exposed and should reverse the lifetime value claimed at acquisition.
Written guarantee
95%+ tracking accuracy
Measured against Chargebee's paid invoices by payment date, net of refunds and failed payments.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Chargebee → Matomo questions, answered
Store the Matomo visitor ID on the Chargebee customer at signup and send payments through the HTTP Tracking API with the invoice ID as the order ID.
Generally no. Record the first payment as the order and keep renewals out, or as a separate goal, so channel revenue stays about acquisition.
Almost always because the first-party visitor ID never reached the Chargebee subscription. The identifier must live on the customer or subscription so it survives a trial period that is longer than any browser cookie you can rely on. Chargebee's hosted checkout is also a different origin, so nothing crosses it by default. 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 Chargebee payment_succeeded webhook. Fire on payment succeeded, not invoice generated, and key the conversion on the billing period so a dunning sequence with four retries produces one conversion rather than four.
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 Chargebee → Matomo
- Chargebee → Google AdsConnecting Chargebee to Google Ads
- Chargebee → MetaConnecting Chargebee to Meta Conversions API
- Chargebee → GA4Connecting Chargebee to GA4
RELATED GUIDES
Where Chargebee → Matomo fits in the rest of your tracking
- Paddle → MatomoConnecting Paddle to Matomo
- Maxio → MatomoConnecting Maxio to Matomo
- Helcim → MatomoConnecting Helcim to Matomo
- Chargebee → AmplitudeConnecting Chargebee to Amplitude
- Chargebee → GA4Connecting Chargebee to GA4
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
- Worldpay → MatomoConnecting Worldpay to Matomo
- Zip → MatomoConnecting Zip to Matomo
Free · 30 min
Get Chargebee and Matomo joined properly
Free30 minutesNo obligation
