Skip to main content
CartHook → MatomoIntegration guide

Connecting CartHook to Matomo

CartHook does post-purchase one-click upsells specifically, which means every pound it adds arrives after the order was created and after any checkout-time conversion already fired. 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 CartHook post-purchase 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

CartHook to Matomo: order IDs and the visitor ID across checkout

Matomo records an ecommerce order once per order ID, so the first total wins and a later CartHook upsell isn't added. Send the order from your server after the post-purchase window with final line items, or track the upsell as a separate goal. Write the Matomo visitor ID to a cart attribute before checkout so the webhook joins the visit.

Matomo records an ecommerce order once per order ID, which settles the CartHook timing question: whatever total arrives first is the one that stays. A Matomo tag on the order status page, or a server call from the order-created webhook, records the pre-upsell value, and a second order call with the same ID will not add the upsell. Send the order from your server after the post-purchase window with the final line items, or track the upsell as a separate goal with its own revenue.

The server call needs the Matomo visitor ID to join the order to the visit. Shopify's checkout runs outside your storefront theme, so read the visitor ID on your domain and write it to the cart as an attribute before checkout; it then comes back on the order and the webhook can attach it. Without it, the order lands on a new visitor with no referrer, and paid channels look worse than they are.

Self-hosting lets you verify this directly: find the order in the visit log, confirm the referrer and campaign survived, then compare Matomo's ecommerce revenue for a closed week with Shopify's settled totals. Plan how an upsell-only refund will be handled; Matomo's ecommerce reports are built around orders rather than adjustments, so the correction usually lives in your own reporting.

CartHook → Matomo · what breaks

Why this join usually fails — CartHook → Matomo

  1. 01

    The first-party visitor ID never reaches CartHook

    The offer runs after order creation, so anything that fired at checkout has already gone.

  2. 02

    Upsell revenue that no campaign ever gets credit for

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  3. 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.

  4. 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.

CartHook → Matomo · the fix

What working looks like — CartHook → 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

CartHook → Matomo · architecture

How CartHook and Matomo actually connect

  1. 1

    CartHook holds the truth

    A one-click upsell charges the stored payment method and appends to the same order. The order total changes; the checkout total does not.

  2. 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. 3

    The identifier is the bridge

    The first-party visitor ID, captured at the visit and carried into the CartHook post-purchase order.

  4. 4

    The event source decides reliability

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  5. 5

    Deduplication at the destination

    Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.

CartHook → Matomo · normal or broken

Working vs. broken, side by side — CartHook → Matomo

Normal, not a fault

  • The first-party visitor ID present on the order

  • Sent from the Shopify order 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 offer runs after order creation, so anything that fired at checkout has already gone.

  • Sent from the browser

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  • 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

CartHook → Matomo · diagnose

Diagnostic order — CartHook → Matomo

  1. 01

    Count orders carrying the first-party visitor ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare checkout total against final settled total

    The gap is the revenue your conversion reporting is currently discarding.

  4. 04

    Check tracker reachability and database lag before debugging any tag

    On self-hosted analytics the answer is infrastructure more often than instrumentation.

  5. 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.

CartHook → Matomo · prove

How it gets proven — CartHook → Matomo

Source of truth

The final Shopify order total after the post-purchase sequence completes.

  • The first-party visitor ID confirmed present on a live order.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • Settled order totals reconciled against imported conversions for a closed week.

CartHook → 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
  • Compare checkout total against final settled total
  • Check tracker reachability and database lag before debugging any tag
  • Read the match rate, not the success message

Checked against

The final Shopify order total after the post-purchase sequence completes.

Get my free conversion tracking audit

Free30 minutesNo obligation

CartHook → Matomo · when not to buy

When you don't need this — CartHook → Matomo

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the first-party visitor ID.
  • Stores without post-purchase offers can report checkout value and the timing question does not arise.
  • 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.

CartHook → Matomo · what we deliver

What gets built — CartHook → Matomo

  • Identifier capture into CartHook

    Send the conversion from the order webhook once the post-purchase window closes, rather than at checkout.

  • Event source: the Shopify order webhook

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  • Dispatch to Matomo

    The Matomo HTTP Tracking API, posted server-side from your order system.

  • Reversals where they exist

    Refunds reverse; an upsell-only refund should reduce rather than reverse the order.

Written guarantee

95%+ tracking accuracy

Measured against The final Shopify order total after the post-purchase sequence completes.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

CartHook → Matomo questions, answered

Matomo kept the first total it received for each order ID, usually the pre-upsell checkout value. Send the settled order once, after the offer window.

Free · 30 min

Get CartHook and Matomo joined properly

Free30 minutesNo obligation