Skip to main content
OpenCart → AmplitudeIntegration guide

Connecting OpenCart to Amplitude

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. Amplitude is built around behavioural cohorts, which makes the identity resolution and the event taxonomy load-bearing in a way they never are for an ad pixel. The join between them succeeds or fails on one thing: whether the user ID and device ID pair reaches the OpenCart order before the conversion happens, because Amplitude can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

OpenCart to Amplitude: customer_id, guest checkout and short IDs

Never send OpenCart customer_id raw as Amplitude user ID: guests share 0 and short integers may be rejected. Use a padded prefixed ID like oc-000042 for registered customers and the device ID, saved against order_id, for guests. Send paid orders server-side per product line with one consistent currency, using order_id as insert_id.

The obvious user ID for OpenCart is customer_id, and it causes two separate problems in Amplitude. Guest checkouts are stored with customer_id 0, so sending it as the user ID merges every guest into one enormous user whose retention looks spectacular. And OpenCart IDs are short integers, while Amplitude's API by default rejects user IDs below a minimum length; confirm the current limit in Amplitude's docs. Prefix and pad the ID consistently, something like oc-000042, on the browser SDK and the server alike.

Guests need the device ID instead. Read it from the Amplitude browser SDK at checkout, save it in your own table keyed by order_id, and send the paid order server-side with that device ID. Registered customers get the prefixed customer_id, set in the browser at login so pre-login browsing merges into it.

Revenue goes in per product line from the order's products, with price, quantity and product ID, sent only when the order history reaches a status agreed to mean paid. OpenCart stores totals in the store's default currency and keeps the shopper's currency and exchange rate beside them, so pick one and send it every time. Use the order_id as insert_id, or a store that moves orders through two paid statuses will count them twice.

OpenCart → Amplitude · what breaks

Why this join usually fails — OpenCart → Amplitude

  1. 01

    The user ID and device ID pair 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

    Revenue events that carry no revenue

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  4. 04

    Nothing reconciles afterwards

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

OpenCart → Amplitude · the fix

What working looks like — OpenCart → Amplitude

  • The user ID and device ID pair on every order

  • Conversions arriving in Amplitude

    The event lands on the user, joins their behavioural history, and becomes available for cohorts, funnels and retention.

  • Reconciled against the source

OpenCart → Amplitude · architecture

How OpenCart and Amplitude 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

    Amplitude needs a click to match

    Amplitude needs a device or user identifier, an event type and its properties. Revenue events need the price and quantity fields specifically, or the revenue reporting stays empty while events flow normally.

  3. 3

    The identifier is the bridge

    The user ID and device ID pair, 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

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

OpenCart → Amplitude · normal or broken

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

Normal, not a fault

  • The user ID and device ID pair present on the order

  • Sent from the OpenCart order record

  • Deduplicated correctly

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

  • Reconciles with the source

Actually broken

  • The user ID and device ID pair 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

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  • Nobody has reconciled it

OpenCart → Amplitude · diagnose

Diagnostic order — OpenCart → Amplitude

  1. 01

    Count orders carrying the user ID and device ID pair

  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 a purchase event for the price and quantity fields specifically

    Not whether the event arrived — whether the revenue fields are populated, in the exact names Amplitude expects.

  5. 05

    Read the match rate, not the success message

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

OpenCart → Amplitude · prove

How it gets proven — OpenCart → Amplitude

Source of truth

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

  • The user ID and device ID pair confirmed present on a live order.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Orders in paid statuses reconciled against the payment gateway's settled total for a closed week.

OpenCart → Amplitude · free audit

What we check in the free audit

  • Count orders carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • List the order statuses in use and agree which mean money received
  • Check a purchase event for the price and quantity fields specifically
  • 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 → Amplitude · when not to buy

When you don't need this — OpenCart → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the user ID and device ID pair.
  • If the store runs an unmaintained checkout extension, fixing or replacing that comes before any tracking work.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

OpenCart → Amplitude · what we deliver

What gets built — OpenCart → Amplitude

  • 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 Amplitude

    The Amplitude HTTP V2 API, posted server-side with the identity, event type and properties.

  • 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 → Amplitude questions, answered

Guest orders have customer_id 0, and sending that as the user ID merges every guest into one profile. Send guests on the device ID captured in the browser instead.

Free · 30 min

Get OpenCart and Amplitude joined properly

Free30 minutesNo obligation