Connecting AfterShip Returns to Matomo
AfterShip handles returns across many carriers and regions, which makes it the place where the true cost of a cross-border return finally becomes visible. 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 AfterShip return 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
AfterShip returns in self-hosted Matomo: net margin in SQL
Matomo doesn't reverse ecommerce orders, but self-hosted data sits in your own database. Load AfterShip returns beside it, keyed by return ID, with refunded amount, return shipping cost and resolution, and join on the order ID Matomo stored. Check that ID matches the public order number AfterShip shows, and avoid negative-revenue goals.
Matomo's ecommerce reports record orders by order ID and do not reverse them when goods come back; check the documentation for your version, but plan on no built-in refund handling. On a self-hosted instance that matters less than elsewhere, because the conversion rows sit in your own database. Load AfterShip returns into a table beside it and join on the order ID Matomo stored with each ecommerce order.
That join gives something hosted analytics rarely allows: net revenue by channel, campaign and destination country, computed in SQL against the raw visit and conversion data. Carry refunded amount, return shipping cost and resolution (refund versus exchange or store credit) from AfterShip, keyed by return ID so repeated webhook updates overwrite instead of duplicating.
The pair-specific break is order ID drift. If the store sends Matomo an internal order ID while AfterShip shows customers the public order number, the join fails silently on every row. Trace one real return end to end before trusting any figure. Avoid the workaround of posting negative-revenue goals through the Tracking API: it muddies conversion counts and visit metrics for a number SQL produces more honestly.
AfterShip Returns → Matomo · what breaks
Why this join usually fails — AfterShip Returns → Matomo
- 01
The first-party visitor ID never reaches AfterShip Returns
Returns are initiated in a hosted portal weeks after the order.
- 02
Return cost averaged across very different markets
A market with a twelve percent return rate and cheap domestic logistics is a different business from one with the same rate and international freight. One blended net figure recommends the wrong market.
- 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.
AfterShip Returns → Matomo · the fix
What working looks like — AfterShip Returns → Matomo
The first-party visitor ID on every return
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
AfterShip Returns → Matomo · architecture
How AfterShip Returns and Matomo actually connect
- 1
AfterShip Returns holds the truth
A domestic return costs a label. An international return can cost more than the item's margin, and the rate differs by market. Averaging them hides which markets are actually profitable.
- 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 AfterShip return.
- 4
The event source decides reliability
Send orders net of returns including actual return shipping, reported by destination market.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
AfterShip Returns → Matomo · normal or broken
Working vs. broken, side by side — AfterShip Returns → Matomo
Normal, not a fault
The first-party visitor ID present on the return
Sent from the store order record, adjusted by return outcome and cost
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
Returns are initiated in a hosted portal weeks after the order.
Sent from the browser
A market with a twelve percent return rate and cheap domestic logistics is a different business from one with the same rate and international freight. One blended net figure recommends the wrong market.
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
AfterShip Returns → Matomo · diagnose
Diagnostic order — AfterShip Returns → Matomo
- 01
Count returns carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Compute net margin per destination market after return costs
It frequently reverses which markets look worth advertising in.
- 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.
AfterShip Returns → Matomo · prove
How it gets proven — AfterShip Returns → Matomo
Source of truth
Store orders net of returns, with return shipping cost by destination.
- The first-party visitor ID confirmed present on a live return.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Net margin reconciled per market after returns and their logistics cost.
AfterShip Returns → Matomo · free audit
What we check in the free audit
- Count returns carrying the first-party visitor ID
- Follow one real conversion end to end
- Compute net margin per destination market after return costs
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Store orders net of returns, with return shipping cost by destination.
Free30 minutesNo obligation
AfterShip Returns → Matomo · when not to buy
When you don't need this — AfterShip Returns → Matomo
- Measure identifier coverage yourself first — pull your last hundred returns and count how many carry the first-party visitor ID.
- Single-market sellers with flat return shipping can use one blended figure without losing anything.
- 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.
AfterShip Returns → Matomo · what we deliver
What gets built — AfterShip Returns → Matomo
Identifier capture into AfterShip Returns
Join on the order identifier and carry return cost back onto it before computing margin.
Event source: the store order record, adjusted by return outcome and cost
Send orders net of returns including actual return shipping, reported by destination market.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Returns reverse with their full logistics cost.
Written guarantee
95%+ tracking accuracy
Measured against Store orders net of returns, with return shipping cost by destination.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
AfterShip Returns → Matomo questions, answered
Its ecommerce tracking does not reverse orders when items are returned; check your version's documentation. On a self-hosted instance, join AfterShip refunds to the order data in your own database instead.
Join a table of AfterShip refunds to Matomo's ecommerce conversions on order ID, then group by campaign and country. It only works if both systems use the same order identifier.
Almost always because the first-party visitor ID never reached the AfterShip return. Returns are initiated in a hosted portal weeks after the order. 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 store order record, adjusted by return outcome and cost. Send orders net of returns including actual return shipping, reported by destination market.
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 AfterShip Returns → Matomo
- Loop → MatomoConnecting Loop Returns to Matomo
- AfterShip Returns → Google AdsConnecting AfterShip Returns to Google Ads
- AfterShip Returns → MetaConnecting AfterShip Returns to Meta Conversions API
RELATED GUIDES
Where AfterShip Returns → Matomo fits in the rest of your tracking
- Redo → MatomoConnecting Redo to Matomo
- Loop → MatomoConnecting Loop Returns to Matomo
- Narvar → MatomoConnecting Narvar to Matomo
- AfterShip Returns → AmplitudeConnecting AfterShip Returns to Amplitude
- AfterShip Returns → GA4Connecting AfterShip Returns to GA4
- Footwear ecommerceConversion tracking for footwear ecommerce, measured net of returns
Free · 30 min
Get AfterShip Returns and Matomo joined properly
Free30 minutesNo obligation
