Skip to main content
Ecwid → SegmentIntegration guide

Connecting Ecwid to Segment

Ecwid is a store that embeds into someone else's website, which makes it the only ecommerce platform here where the checkout runs inside a widget on a page you do not fully control. 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 Ecwid 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

Ecwid to Segment: Order Completed with the host page's identity

Send the Ecwid purchase as a server-side Order Completed track call from the order webhook, following Segment's ecommerce spec. Write analytics.js's anonymousId into an Ecwid extra field at checkout so the call carries it, add a userId for known customers, derive messageId from the Ecwid order ID, and send Order Refunded when Ecwid records a refund.

In Segment, the Ecwid purchase should be an Order Completed track call sent server-side from the order webhook, following Segment's ecommerce spec so downstream destinations map it without custom work. Identity is the hard part: analytics.js runs on the host page and knows the anonymousId, and Ecwid does not. Write the anonymousId into an Ecwid extra field at checkout along with the click IDs, and send the track call with it, plus a userId once the buyer is a known customer.

Derive the messageId from the Ecwid order ID so the paid status and later order updates do not fan out as several purchases, and send Order Refunded when Ecwid records a refund instead of resending the order. Carry the visitor's consent choice from the host page's consent tool onto the order too, so ad destinations in your workspace can be filtered by it; otherwise a visitor who declined tracking still reaches Meta or Google Ads through Segment.

If the host page also fires Order Completed from the browser, as some Ecwid setups do through the widget's JavaScript events, turn one of them off. Segment will forward both to every destination. And if the same store is embedded on more than one site, include the host domain as a property so warehouse queries can split by it.

Ecwid → Segment · what breaks

Why this join usually fails — Ecwid → Segment

  1. 01

    The userId and anonymousId never reaches Ecwid

    The store runs inside an embedded widget, so the host page's scripts and the widget's own context are not the same environment. An identifier captured by the host page does not automatically reach the order, and a purchase inside the widget does not automatically fire the host page's tags.

  2. 02

    A checkout inside somebody else's page

    The host site and the store widget are two contexts. Tags installed on the host page routinely miss purchases entirely, and nobody notices because the site looks like it is working.

  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.

Ecwid → Segment · the fix

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

Ecwid → Segment · architecture

How Ecwid and Segment actually connect

  1. 1

    Ecwid holds the truth

    Ecwid is authoritative for the order. Because it embeds into WordPress, Wix, Squarespace and plain HTML sites alike, the surrounding page's own analytics frequently has no idea a purchase happened.

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

  4. 4

    The event source decides reliability

    Send from your server when Ecwid reports the order paid. The widget's own client-side events depend on the host page still being open and the embed having initialized correctly, neither of which is guaranteed.

  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.

Ecwid → Segment · normal or broken

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

Normal, not a fault

  • The userId and anonymousId present on the order

  • Sent from the Ecwid order webhook

  • 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

    The store runs inside an embedded widget, so the host page's scripts and the widget's own context are not the same environment. An identifier captured by the host page does not automatically reach the order, and a purchase inside the widget does not automatically fire the host page's tags.

  • Sent from the browser

    The host site and the store widget are two contexts. Tags installed on the host page routinely miss purchases entirely, and nobody notices because the site looks like it is working.

  • 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

Ecwid → Segment · diagnose

Diagnostic order — Ecwid → Segment

  1. 01

    Count orders carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    Open a recent Ecwid order and check its extra fields

    If the identifier is not on the order, the host page captured it and never passed it across the embed boundary.

  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.

Ecwid → Segment · prove

How it gets proven — Ecwid → Segment

Source of truth

Ecwid's order list for the same window, in the store's currency and timezone.

  • 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.
  • A purchase completed through the embedded widget, confirmed to report with the identifier attached.

Ecwid → Segment · free audit

What we check in the free audit

  • Count orders carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Open a recent Ecwid order and check its extra fields
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

Ecwid's order list for the same window, in the store's currency and timezone.

Get my free conversion tracking audit

Free30 minutesNo obligation

Ecwid → Segment · when not to buy

When you don't need this — Ecwid → Segment

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the userId and anonymousId.
  • If your Ecwid store is a small add-on to a content site with modest volume, the native integrations may be adequate — measure the order volume before commissioning anything.
  • 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.

Ecwid → Segment · what we deliver

What gets built — Ecwid → Segment

  • Identifier capture into Ecwid

    Capture the click identifier on the host page and pass it into the Ecwid order through its order-extra-fields or the storefront API, so it lands on the order record rather than staying on the page.

  • Event source: the Ecwid order webhook

    Send from your server when Ecwid reports the order paid. The widget's own client-side events depend on the host page still being open and the embed having initialized correctly, neither of which is guaranteed.

  • 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

    Ecwid records refunds and cancellations against the original order, so reversals can be wired properly.

Written guarantee

95%+ tracking accuracy

Measured against Ecwid's order list for the same window, in the store's currency and timezone.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Ecwid → Segment questions, answered

Check Ecwid's app market and Segment's catalog. Otherwise send Order Completed from your own webhook handler with a Segment server library; the identity still has to come from the host page.

Free · 30 min

Get Ecwid and Segment joined properly

Free30 minutesNo obligation