Skip to main content
FHAVI

Research · Tracking

Server-side tracking on a custom checkout: what Shopify handles and you now own

Moving off a hosted checkout moves six tracking responsibilities onto your code. The failure modes that appear within a fortnight, and the ones that appear at month end.

2 min read

In brief

  • A hosted checkout gives you session continuity, reliable purchase firing and refund events for free; a custom checkout means you implement all three.
  • The most common failure is not a missing event but a purchase that fires before payment is confirmed, or twice on retry.
  • Test with a real payment, a failed payment, and a retry — three scenarios that a happy-path test never covers.

What you inherit

ResponsibilityHosted checkoutCustom checkout
Session continuity across checkoutHandledYours — cookies, storage, identifiers
Purchase fired once, after confirmationHandledYours — and the hardest to get right
Refund eventsOften automaticYours, with no default
Currency and value mappingHandledYours
Retry and idempotencyHandledYours

The failures that appear in the first fortnight

  • Purchase fired on the redirect rather than on server confirmation, so a failed payment reports a sale.
  • Purchase fired twice when the customer retries — same order, two events, two ids.
  • Event id generated per request instead of per order, which breaks deduplication with the browser copy.
  • Consent applied to the page but not to the server call, because the server has no banner to consult.
  • Value sent before the final shipping and discount calculation, so every order is off by a predictable amount.

The test that catches most of it

  1. 1

    Real payment, successful

    One event, correct value, correct currency, id present.

  2. 2

    Real payment, declined

    No purchase event at all. This is the test most teams skip and the one that inflates reports fastest.

  3. 3

    Retry after failure

    One purchase event total, not two. If the retry creates a second order id, the id must come from the order, not the attempt.

  4. 4

    Refund

    A refund event, or deliberate documentation that refunds are handled elsewhere. Silence is not a decision.

Why this matters commercially

A custom checkout is usually built for conversion. A checkout that reports phantom purchases will show a better conversion rate than it has, and the improvement will be credited to the redesign.

A hosted checkout hid six responsibilities. If you have replaced it, you own all six — and the only one that will be noticed late is the purchase that fires on a payment that never completed.

Questions

Asked about this directly

Can I keep browser tracking only?
You can, but on a custom checkout you are losing the session context a hosted flow used to guarantee. At minimum, send the purchase from the server where confirmation happens.
Where should the event id come from?
The order record. Generate it once at order creation and store it, so every attempt — browser, server, retry — carries the same value.
How do consent rules apply server-side?
The same lawful basis applies. Capture the consent decision at the point of collection and pass it with the order, so the server can respect it rather than guess.

Keep reading

Other pieces in the library

All research

Numbers first, promises second

Send your store and we will tell you which of these failure modes is already happening — before you pay for a fix.

Prefer email? Write to md@fhavi.com