Connecting Shopify to Matomo
Shopify is the system of record for the order, and its admin numbers are the ones the business runs on. 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 Shopify order 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
Shopify ecommerce orders into Matomo with the visitor ID kept
Matomo's tracker runs in the Shopify theme but not on checkout. Read the Matomo visitor ID on the storefront, write it to a cart attribute, and send the order server-side through the HTTP Tracking API with that visitor ID, the Shopify order ID as ecommerce order ID, line-item rows, and revenue split into subtotal, tax, shipping and discount.
Matomo's JavaScript tracker runs fine in a Shopify theme, so product views and carts are straightforward. The order is the gap: the tracker cannot run on checkout or the thank-you page, and a custom pixel loading Matomo inside Shopify's sandbox sees the purchase but not the storefront's Matomo cookie in the usual way. Read the Matomo visitor ID on the storefront, write it to a cart attribute, and send the order server-side through the HTTP Tracking API with that visitor ID, so the order lands on the visit that came from the campaign.
Send the Shopify order ID as the ecommerce order ID, item rows from line items, and revenue split into subtotal, tax, shipping and discount. Matomo's ecommerce order has a slot for each, which makes it one of the few destinations where Shopify's totals can be represented without picking one number. Some server-side overrides, such as backdating a hit to the paid time, need an auth token; confirm parameter names and token rules in Matomo's Tracking API reference.
If you self-host on your own subdomain, Matomo records storefront visits that blocked third-party tags miss, which improves how many Shopify orders can be tied to a campaign visit. Measure it: count paid orders arriving with a stored visitor ID against those without.
Shopify → Matomo · what breaks
Why this join usually fails — Shopify → Matomo
- 01
The first-party visitor ID never reaches Shopify
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
- 02
Checkout extensibility hides what you need
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
- 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.
Shopify → Matomo · the fix
What working looks like — Shopify → Matomo
The first-party visitor ID on every order
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
Shopify → Matomo · architecture
How Shopify and Matomo actually connect
- 1
Shopify holds the truth
The order carries line items, discounts, shipping, tax, currency and the customer. Note which figure you intend to report — total, subtotal, or net of shipping and tax — because most mismatches between Shopify and an ad platform turn out to be two people comparing two different numbers.
- 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 Shopify order.
- 4
The event source decides reliability
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Shopify → Matomo · normal or broken
Working vs. broken, side by side — Shopify → Matomo
Normal, not a fault
The first-party visitor ID present on the order
Sent from the orders/paid 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
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
Sent from the browser
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
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
Shopify → Matomo · diagnose
Diagnostic order — Shopify → Matomo
- 01
Count orders carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Open a recent paid order and read its note attributes
If the identifier is not on the order, nothing downstream can attribute it. Check ten orders, not one — partial coverage is the normal failure, not total absence.
- 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.
Shopify → Matomo · prove
How it gets proven — Shopify → Matomo
Source of truth
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
- The first-party visitor ID confirmed present on a live order.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Order totals in Shopify Admin reconciled per order, not on the summed total, over a closed window.
Shopify → Matomo · free audit
What we check in the free audit
- Count orders carrying the first-party visitor ID
- Follow one real conversion end to end
- Open a recent paid order and read its note attributes
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
Free30 minutesNo obligation
Shopify → Matomo · when not to buy
When you don't need this — Shopify → Matomo
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the first-party visitor ID.
- Shopify's own native channel integrations already cover simple single-currency stores adequately. If your admin numbers and platform numbers already agree, you do not need this.
- 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.
Shopify → Matomo · what we deliver
What gets built — Shopify → Matomo
Identifier capture into Shopify
Capture the click identifier on the storefront, write it to a cart attribute so it becomes an order note attribute, and read it back server-side from the order. That path survives the checkout domain hop that breaks cookie-based approaches.
Event source: the orders/paid webhook
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
refunds/create fires with the original order reference, so refunds and cancellations can be reversed at the destination.
Written guarantee
95%+ tracking accuracy
Measured against Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Shopify → Matomo questions, answered
Not with the JavaScript tracker on checkout pages. Send the paid order server-side through the HTTP Tracking API with the visitor ID you saved on the cart.
The order was tracked from a context without the storefront's visitor ID, usually a sandboxed pixel. Carry the ID on the cart and set it on the server-side order hit.
Almost always because the first-party visitor ID never reached the Shopify order. Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself. 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 orders/paid webhook. Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
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 Shopify → Matomo
- Shopify POS → MatomoConnecting Shopify POS to Matomo
- Checkout Extensibility → MatomoConnecting Shopify Checkout Extensibility to Matomo
- Shopify → HubSpotConnecting Shopify to HubSpot
RELATED GUIDES
Where Shopify → Matomo fits in the rest of your tracking
- Gumroad → MatomoConnecting Gumroad to Matomo
- WooCommerce Subscriptions → MatomoConnecting WooCommerce Subscriptions to Matomo
- PrestaShop → MatomoConnecting PrestaShop to Matomo
- Shopify → Adobe AnalyticsConnecting Shopify to Adobe Analytics
- Shopify → AmplitudeConnecting Shopify to Amplitude
- SupplementsConversion tracking for supplement brands, built around subscription value
- BigCommerce → MatomoConnecting BigCommerce to Matomo
- Ecwid → MatomoConnecting Ecwid to Matomo
Free · 30 min
Get Shopify and Matomo joined properly
Free30 minutesNo obligation
