Skip to main content
PrestaShop → SegmentIntegration guide

Connecting PrestaShop to Segment

PrestaShop is self-hosted open source with a large module ecosystem, which means the store's behaviour depends heavily on which modules are installed. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the PrestaShop order before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

PrestaShop to Segment: one Order Completed from the hook, then fan out

Send one server-side Order Completed from the PrestaShop order validation hook, or on paid state for offline payments, following Segment's ecommerce spec with the order reference as order_id. Store the analytics.js anonymousId on the cart and use a hashed email as userId if guests check out. Use catalog-matching combination IDs, and send credit slips as Order Refunded.

For a PrestaShop store sending orders to several ad platforms, an email tool and a warehouse, Segment can replace a stack of separate tracking modules, each of which can conflict with the others and break after an update. The design: one server-side Order Completed from the order validation hook, or on the transition to a paid state for offline payment methods, following Segment's ecommerce spec with products, revenue, currency and the order reference as order_id.

Identity: analytics.js on the storefront gives each visitor an anonymousId; store it on the cart when checkout begins so the server call can send it alongside userId. Use id_customer as userId only if guest checkout is off; otherwise a stable hashed email avoids splitting guests into several users. Carry the click identifiers captured at landing and the choice recorded by your consent module as properties or context, so ad destinations downstream receive only what they're allowed to use.

Product IDs in Order Completed should be the same IDs your catalog feeds use, combination IDs included, because Segment forwards whatever you send to every catalog-based destination. Send credit slips as Order Refunded, and use the order reference plus event type as the messageId so retries don't multiply across destinations. Check Segment's catalog for a PrestaShop source; a small custom module is often simpler.

PrestaShop → Segment · what breaks

Why this join usually fails — PrestaShop → Segment

  1. 01

    The userId and anonymousId never reaches PrestaShop

    Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.

  2. 02

    Module ecosystem interference

    PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.

  3. 03

    One bad event multiplied across every destination

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  4. 04

    Nothing reconciles afterwards

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

PrestaShop → Segment · the fix

What working looks like — PrestaShop → Segment

  • The userId and anonymousId on every order

  • Conversions arriving in Segment

    Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.

  • Reconciled against the source

PrestaShop → Segment · architecture

How PrestaShop and Segment actually connect

  1. 1

    PrestaShop holds the truth

    You own the data and can query it directly. Pin down which order states count as revenue, since PrestaShop's state machine is more granular than most.

  2. 2

    Segment needs a click to match

    Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.

  3. 3

    The identifier is the bridge

    The userId and anonymousId, captured at the visit and carried into the PrestaShop order.

  4. 4

    The event source decides reliability

    Fire server-side from the hook rather than the confirmation template.

  5. 5

    Deduplication at the destination

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

PrestaShop → Segment · normal or broken

Working vs. broken, side by side — PrestaShop → Segment

Normal, not a fault

  • The userId and anonymousId present on the order

  • Sent from the PrestaShop order validation hook

  • Deduplicated correctly

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

  • Reconciles with the source

Actually broken

  • The userId and anonymousId missing on most records

    Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.

  • Sent from the browser

    PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.

  • Counted twice, or not at all

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  • Nobody has reconciled it

PrestaShop → Segment · diagnose

Diagnostic order — PrestaShop → Segment

  1. 01

    Count orders carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    Check order metadata on ten recent orders

    Partial coverage across orders points at a module conflict rather than a missing implementation.

  4. 04

    Check identity resolution before checking anything downstream

    If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.

  5. 05

    Read the match rate, not the success message

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

PrestaShop → Segment · prove

How it gets proven — PrestaShop → Segment

Source of truth

PrestaShop's order records in your own database, for the same window and order state set.

  • The userId and anonymousId confirmed present on a live order.
  • An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
  • Order metadata confirmed present across ten consecutive orders rather than one.

PrestaShop → Segment · free audit

What we check in the free audit

  • Count orders carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Check order metadata on ten recent orders
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

PrestaShop's order records in your own database, for the same window and order state set.

Get my free conversion tracking audit

Free30 minutesNo obligation

PrestaShop → Segment · when not to buy

When you don't need this — PrestaShop → Segment

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the userId and anonymousId.
  • If your PrestaShop install is heavily moduled and maintained by another party, scope their involvement before starting.
  • If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.

PrestaShop → Segment · what we deliver

What gets built — PrestaShop → Segment

  • Identifier capture into PrestaShop

    Capture the identifier and write it to order metadata through a hook, server-side, so it does not depend on page execution.

  • Event source: the PrestaShop order validation hook

    Fire server-side from the hook rather than the confirmation template.

  • Dispatch to Segment

    Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.

  • Reversals where they exist

    Credit slips are recorded against the order.

Written guarantee

95%+ tracking accuracy

Measured against PrestaShop's order records in your own database, for the same window and order state set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

PrestaShop → Segment questions, answered

Check Segment's catalog for a PrestaShop source. Many stores instead send server-side calls from PrestaShop order hooks to Segment's HTTP Tracking API.

Free · 30 min

Get PrestaShop and Segment joined properly

Free30 minutesNo obligation