Skip to main content
Swell → MatomoIntegration guide

Connecting Swell to Matomo

Swell is headless commerce with subscriptions built in, which puts two conversion types in one system: a one-off order and a recurring plan that will bill again next month. 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 Swell 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

Swell ecommerce orders in Matomo, renewals excluded

Use the Swell order ID as Matomo's order ID and track page views on client-side route changes. For server-side orders from Swell's webhook, store the Matomo visitor ID in cart metadata and send it with the Tracking API call, or orders credit direct. Track renewals as a custom event, not ecommerce orders, or report them from Swell.

Matomo's ecommerce reports count an order once per order ID, so the Swell order ID goes in as the Matomo order ID. On a headless storefront, also make sure the tracker records page views on client-side route changes; many single-page Swell builds only track the first load, and Matomo then shows every buyer as a one-page visit that somehow ended in an order.

For orders tracked server-side from Swell's webhook through the HTTP Tracking API, the Matomo visitor ID from the browser has to reach the order. Read it on the storefront when the cart is created, store it in the Swell cart's metadata, and send it back with the order. Without it, Matomo opens a new visit for the order and attributes it to direct traffic, which on a self-hosted install with no ad-blocker losses is a self-inflicted gap.

Renewals should not be ecommerce orders here. Swell bills them with no visit, so posting them as orders creates a fresh visitless visit each month and inflates revenue by acquisition channel. Track renewals as a custom event, or keep them out and report subscription revenue from Swell. If you self-host Matomo, a monthly renewal batch arriving at once is also a load spike worth testing.

Swell → Matomo · what breaks

Why this join usually fails — Swell → Matomo

  1. 01

    The first-party visitor ID never reaches Swell

    Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.

  2. 02

    Renewals indistinguishable from new orders

    In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.

  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.

Swell → Matomo · the fix

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

Swell → Matomo · architecture

How Swell and Matomo actually connect

  1. 1

    Swell holds the truth

    A subscription's first payment and its renewals are the same object type in most exports. Sending both means one acquisition produces a conversion every billing cycle.

  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 Swell order.

  4. 4

    The event source decides reliability

    Send one-off orders and first subscription payments. Renewals belong in a retention figure.

  5. 5

    Deduplication at the destination

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

Swell → Matomo · normal or broken

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

Normal, not a fault

  • The first-party visitor ID present on the order

  • Sent from the Swell order and subscription webhooks

  • 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

    Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.

  • Sent from the browser

    In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.

  • 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

Swell → Matomo · diagnose

Diagnostic order — Swell → Matomo

  1. 01

    Count orders carrying the first-party visitor ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare monthly conversion count against new customer count

    If conversions exceed new customers, renewals are being counted as acquisition.

  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.

Swell → Matomo · prove

How it gets proven — Swell → Matomo

Source of truth

Swell orders and subscriptions by date, held apart from each other.

  • The first-party visitor ID confirmed present on a live order.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • First payments reconciled against imported conversions, with renewals reported separately.

Swell → 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 monthly conversion count against new customer count
  • Check tracker reachability and database lag before debugging any tag
  • Read the match rate, not the success message

Checked against

Swell orders and subscriptions by date, held apart from each other.

Get my free conversion tracking audit

Free30 minutesNo obligation

Swell → Matomo · when not to buy

When you don't need this — Swell → Matomo

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the first-party visitor ID.
  • A store selling only one-off products does not have the renewal problem.
  • 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.

Swell → Matomo · what we deliver

What gets built — Swell → Matomo

  • Identifier capture into Swell

    Write the identifier into customer metadata so the first payment can be attributed and renewals can be recognised as renewals.

  • Event source: the Swell order and subscription webhooks

    Send one-off orders and first subscription payments. Renewals belong in a retention figure.

  • Dispatch to Matomo

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

  • Reversals where they exist

    Refunds and cancellations inside the first period reverse.

Written guarantee

95%+ tracking accuracy

Measured against Swell orders and subscriptions by date, held apart from each other.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Swell → Matomo questions, answered

Use the Swell order ID as the Matomo order ID, which Matomo deduplicates on, and send each order from a single place.

Free · 30 min

Get Swell and Matomo joined properly

Free30 minutesNo obligation