Skip to main content
LoyaltyLion → MatomoIntegration guide

Connecting LoyaltyLion to Matomo

LoyaltyLion is built around tiers, which means a customer's discount rate changes as they spend more — and so does the margin on every subsequent order. 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 LoyaltyLion tier 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

LoyaltyLion in Matomo: record the tier discount in the order call

Post orders server-side through Matomo's HTTP Tracking API with revenue as collected and the LoyaltyLion tier discount in the order call's discount field, using the stored visitor ID and Shopify order ID. Add tier as a custom dimension on login and on each order. Track widget opens and redemptions as plain events.

Matomo's ecommerce order call takes a revenue figure and a separate discount amount. That second field is where LoyaltyLion's automatic tier discount belongs. Send the order with revenue as collected and the tier discount in the discount field, and your own database holds the margin given away to loyalty on every order, which the storefront's reported total would otherwise hide.

Add tier as a custom dimension. Set it at visit scope when the member logs in so behavior is segmented by tier, and include it on the server-side order so each order keeps the tier the customer held at the time. Post orders through the HTTP Tracking API from your server with the Matomo visitor ID captured on the storefront and the Shopify order ID as the order identifier.

Because Matomo exposes raw visit logs, this pair supports a question most analytics tools make awkward: how do loyalty members actually use the site? Track loyalty widget opens and reward redemptions as events, and compare the paths of high-tier members to new visitors. If members mostly arrive direct and buy quickly, their orders should not be counted as campaign wins in your channel reports.

LoyaltyLion → Matomo · what breaks

Why this join usually fails — LoyaltyLion → Matomo

  1. 01

    The first-party visitor ID never reaches LoyaltyLion

    Tier benefits apply automatically at checkout, so the discount is inside the order rather than in a code.

  2. 02

    Tier discounts absorbed silently into order value

    Unlike a coupon, a tier discount has no code. It is applied automatically and disappears into the order total, so the margin erosion from a maturing loyalty base is invisible in every marketing report.

  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.

LoyaltyLion → Matomo · the fix

What working looks like — LoyaltyLion → Matomo

  • The first-party visitor ID on every redemption

  • 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

LoyaltyLion → Matomo · architecture

How LoyaltyLion and Matomo actually connect

  1. 1

    LoyaltyLion holds the truth

    A top-tier customer buys at a permanently lower margin. Their order value looks identical to a new customer's and is worth meaningfully less, which matters when you are deciding what a new customer is worth acquiring.

  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 LoyaltyLion tier order.

  4. 4

    The event source decides reliability

    Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.

  5. 5

    Deduplication at the destination

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

LoyaltyLion → Matomo · normal or broken

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

Normal, not a fault

  • The first-party visitor ID present on the redemption

  • Sent from your order feed with tier attached

  • 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

    Tier benefits apply automatically at checkout, so the discount is inside the order rather than in a code.

  • Sent from the browser

    Unlike a coupon, a tier discount has no code. It is applied automatically and disappears into the order total, so the margin erosion from a maturing loyalty base is invisible in every marketing report.

  • 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

LoyaltyLion → Matomo · diagnose

Diagnostic order — LoyaltyLion → Matomo

  1. 01

    Count redemptions carrying the first-party visitor ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare average margin by loyalty tier

    As the programme matures this gap widens, and it is the reason a growing loyal base can coincide with falling profitability.

  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.

LoyaltyLion → Matomo · prove

How it gets proven — LoyaltyLion → Matomo

Source of truth

Store orders with the customer's loyalty tier recorded at the time of purchase.

  • The first-party visitor ID confirmed present on a live redemption.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • Orders reconciled net of tier discount against imported conversions, with tier recorded.

LoyaltyLion → Matomo · free audit

What we check in the free audit

  • Count redemptions carrying the first-party visitor ID
  • Follow one real conversion end to end
  • Compare average margin by loyalty tier
  • Check tracker reachability and database lag before debugging any tag
  • Read the match rate, not the success message

Checked against

Store orders with the customer's loyalty tier recorded at the time of purchase.

Get my free conversion tracking audit

Free30 minutesNo obligation

LoyaltyLion → Matomo · when not to buy

When you don't need this — LoyaltyLion → Matomo

  • Measure identifier coverage yourself first — pull your last hundred redemptions and count how many carry the first-party visitor ID.
  • Flat-rate loyalty programmes without tiers do not have this 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.

LoyaltyLion → Matomo · what we deliver

What gets built — LoyaltyLion → Matomo

  • Identifier capture into LoyaltyLion

    Record the tier on the order and net tier discounts out of the reported value.

  • Event source: your order feed with tier attached

    Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.

  • Dispatch to Matomo

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

  • Reversals where they exist

    Refunds reverse.

Written guarantee

95%+ tracking accuracy

Measured against Store orders with the customer's loyalty tier recorded at the time of purchase.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

LoyaltyLion → Matomo questions, answered

In the order's discount field, with revenue as collected. That keeps loyalty margin visible in your own data.

Free · 30 min

Get LoyaltyLion and Matomo joined properly

Free30 minutesNo obligation