Connecting Ecwid to PostHog
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. PostHog can be self-hosted, which changes the calculus entirely: the data stays on infrastructure you control, and so does the responsibility for everything that goes wrong with it. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Ecwid order before the conversion happens, because PostHog can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
PostHog funnels that end at a paid Ecwid order
posthog-js on the host page cannot confirm a widget payment cleared. Read the PostHog distinct_id on the host page, save it in an Ecwid order extra field, and send a purchase from the paid webhook to PostHog's capture API with total, currency and products, plus an event UUID derived from the Ecwid order ID so retried webhooks do not duplicate.
PostHog is for understanding behavior on the site around the store: which articles, landing pages or product embeds lead to an order. posthog-js on the host page can see page views and clicks, but it cannot confirm a widget checkout succeeded or that payment cleared. The useful join is the PostHog distinct_id, read on the host page during the visit and written into an Ecwid order extra field, so the paid order can be sent back to the same person.
Send the order from the Ecwid paid webhook to PostHog's capture API with that distinct_id, a purchase event carrying the total, currency and product names, and an event UUID derived from the Ecwid order ID so a retried webhook does not create a second purchase. If the shopper logged into an Ecwid customer account, alias the Ecwid customer ID to the distinct_id so repeat orders land on one person.
Expect autocapture to be noisy inside the store. Clicks within the widget are recorded as generic interactions, and funnel steps built from them miss orders that took a different path. Build the funnel on the host page events you control, ending on the server-sent purchase. If you self-host PostHog on a subdomain of the store's site, the capture requests stay first-party and survive blockers that kill third-party tags.
Ecwid → PostHog · what breaks
Why this join usually fails — Ecwid → PostHog
- 01
The distinct_id 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.
- 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.
- 03
Self-hosting the analytics and the outage together
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
- 04
Nothing reconciles afterwards
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Ecwid → PostHog · the fix
What working looks like — Ecwid → PostHog
The distinct_id on every order
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Ecwid → PostHog · architecture
How Ecwid and PostHog actually connect
- 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
PostHog needs a click to match
PostHog needs a distinct_id, an event name and its properties. Self-hosted instances additionally need the ingestion endpoint reachable and the project API key correct, which is a class of failure hosted tools do not have.
- 3
The identifier is the bridge
The distinct_id, captured at the visit and carried into the Ecwid order.
- 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
Deduplication at the destination
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Ecwid → PostHog · normal or broken
Working vs. broken, side by side — Ecwid → PostHog
Normal, not a fault
The distinct_id present on the order
Sent from the Ecwid order webhook
Deduplicated correctly
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Reconciles with the source
Actually broken
The distinct_id 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
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
Nobody has reconciled it
Ecwid → PostHog · diagnose
Diagnostic order — Ecwid → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 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.
- 04
Check ingestion health and disk before debugging any missing event
On self-hosted instances the answer is infrastructure far more often than it is instrumentation.
- 05
Read the match rate, not the success message
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Ecwid → PostHog · prove
How it gets proven — Ecwid → PostHog
Source of truth
Ecwid's order list for the same window, in the store's currency and timezone.
- The distinct_id confirmed present on a live order.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- A purchase completed through the embedded widget, confirmed to report with the identifier attached.
Ecwid → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Open a recent Ecwid order and check its extra fields
- Check ingestion health and disk before debugging any missing event
- 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.
Free30 minutesNo obligation
Ecwid → PostHog · when not to buy
When you don't need this — Ecwid → PostHog
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- 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 have no reason to keep the data on your own infrastructure and no team to run it, the hosted product removes the only real downside of this one.
Ecwid → PostHog · what we deliver
What gets built — Ecwid → PostHog
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 PostHog
The PostHog capture API, posted server-side from your backend to your own instance or to PostHog Cloud.
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.
From $400 · See packages
FAQ
Ecwid → PostHog questions, answered
It records clicks inside the widget, but not whether payment succeeded. Send the paid order server-side from the Ecwid webhook with the visitor's distinct_id.
Use an event UUID derived from the Ecwid order ID, so a webhook retry produces the same event rather than a new one.
Almost always because the distinct_id never reached the Ecwid order. 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. Measure coverage before debugging the dispatch.
PostHog identifies by distinct_id with an alias call to merge anonymous and identified users. On a self-hosted instance you also control the ingestion endpoint, which means the identifier survives ad blockers that would kill a third-party pixel — one of the few genuine technical advantages available to a first-party setup.
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.
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
More on Ecwid → PostHog
- Ecwid → Google AdsConnecting Ecwid to Google Ads
- Ecwid → MetaConnecting Ecwid to Meta Conversions API
- Ecwid → GA4Connecting Ecwid to GA4
RELATED GUIDES
Where Ecwid → PostHog fits in the rest of your tracking
- nopCommerce → PostHogConnecting nopCommerce to PostHog
- OpenCart → PostHogConnecting OpenCart to PostHog
- Shopify POS → PostHogConnecting Shopify POS to PostHog
- Ecwid → MatomoConnecting Ecwid to Matomo
- Ecwid → AmplitudeConnecting Ecwid to Amplitude
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- Swell → PostHogConnecting Swell to PostHog
- Braintree → PostHogConnecting Braintree to PostHog
Free · 30 min
Get Ecwid and PostHog joined properly
Free30 minutesNo obligation
