Skip to main content
OpenCart → MatomoIntegration guide

Connecting OpenCart to Matomo

OpenCart is self-hosted and extension-driven, which means the checkout you are measuring is frequently not the one the project ships — someone replaced it with a plugin years ago. 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 OpenCart 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

Self-hosted Matomo ecommerce orders from OpenCart

Self-hosted Matomo and OpenCart can run on your own servers, so send the order server-side through Matomo's HTTP Tracking API. Store the visitor ID from Matomo's cookie with the order, fire when the status enters your paid list (not at the status-0 order creation), use order_id as the order ID, and map sub-total, shipping and tax separately.

This is one of the few pairs where both ends live on infrastructure you run: a PHP cart and a PHP analytics server, often on the same host. That makes a server-side order hit straightforward. Read Matomo's visitor ID from its first-party cookie when the order is confirmed, store it with the order, and send the ecommerce order through the HTTP Tracking API using the OpenCart order_id as the order ID, so a refreshed success page cannot record the sale twice.

The OpenCart detail that breaks this is the order row created before payment. When a customer is sent to PayPal or another off-site gateway, OpenCart writes the order with status 0, the "missing order" state, and only moves it to a real status when the gateway calls back. A browser tag on the success page misses everyone who never returns from the gateway; a hook on order creation counts abandoned payments. Send from the status change into your agreed paid list instead.

Two things to agree before go-live. First, which total: OpenCart breaks the order into sub-total, shipping and tax lines, and Matomo accepts each separately, so map them rather than sending the grand total as revenue. Second, refunds: Matomo has no call to reverse a recorded ecommerce order, so report net revenue from OpenCart and treat Matomo's revenue figure as gross.

OpenCart → Matomo · what breaks

Why this join usually fails — OpenCart → Matomo

  1. 01

    The first-party visitor ID never reaches OpenCart

    Third-party checkout and payment extensions bypass the core order flow, so the identifier can be dropped inside a plugin nobody has read.

  2. 02

    Order status meaning something different in every store

    There is no standard. A pipeline built on the assumption that "Complete" means paid will silently over- or under-count depending on how that particular shop was configured five years ago.

  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.

OpenCart → Matomo · the fix

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

OpenCart → Matomo · architecture

How OpenCart and Matomo actually connect

  1. 1

    OpenCart holds the truth

    Order status is configurable per store. "Complete" can mean paid, shipped or manually closed depending on how the shop was set up, and nobody documents which.

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

  4. 4

    The event source decides reliability

    Send orders whose status is in the agreed paid list, at the order total excluding shipping and tax.

  5. 5

    Deduplication at the destination

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

OpenCart → Matomo · normal or broken

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

Normal, not a fault

  • The first-party visitor ID present on the order

  • Sent from the OpenCart order record

  • 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

    Third-party checkout and payment extensions bypass the core order flow, so the identifier can be dropped inside a plugin nobody has read.

  • Sent from the browser

    There is no standard. A pipeline built on the assumption that "Complete" means paid will silently over- or under-count depending on how that particular shop was configured five years ago.

  • 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

OpenCart → Matomo · diagnose

Diagnostic order — OpenCart → Matomo

  1. 01

    Count orders carrying the first-party visitor ID

  2. 02

    Follow one real conversion end to end

  3. 03

    List the order statuses in use and agree which mean money received

    Ten minutes with the shop owner, and it is the single thing that decides whether the numbers mean anything.

  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.

OpenCart → Matomo · prove

How it gets proven — OpenCart → Matomo

Source of truth

OpenCart orders by order status, with the statuses that mean paid agreed explicitly.

  • The first-party visitor ID confirmed present on a live order.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • Orders in paid statuses reconciled against the payment gateway's settled total for a closed week.

OpenCart → 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
  • List the order statuses in use and agree which mean money received
  • Check tracker reachability and database lag before debugging any tag
  • Read the match rate, not the success message

Checked against

OpenCart orders by order status, with the statuses that mean paid agreed explicitly.

Get my free conversion tracking audit

Free30 minutesNo obligation

OpenCart → Matomo · when not to buy

When you don't need this — OpenCart → Matomo

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the first-party visitor ID.
  • If the store runs an unmaintained checkout extension, fixing or replacing that comes before any tracking work.
  • 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.

OpenCart → Matomo · what we deliver

What gets built — OpenCart → Matomo

  • Identifier capture into OpenCart

    Capture on landing into your own storage and write to the order table directly, not through a checkout extension you do not control.

  • Event source: the OpenCart order record

    Send orders whose status is in the agreed paid list, at the order total excluding shipping and tax.

  • Dispatch to Matomo

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

  • Reversals where they exist

    Refunded and cancelled statuses reverse.

Written guarantee

95%+ tracking accuracy

Measured against OpenCart orders by order status, with the statuses that mean paid agreed explicitly.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

OpenCart → Matomo questions, answered

Usually because the order was confirmed by a payment gateway callback while the customer never returned to the success page. Sending the order server-side when its status changes closes that gap.

Free · 30 min

Get OpenCart and Matomo joined properly

Free30 minutesNo obligation