Connecting Shopify Checkout Extensibility to PostHog
Shopify replaced checkout.liquid with a sandboxed extension model, and the thank-you page — where nearly every store put its conversion tracking — was the last thing to go. 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 Shopify 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 on Shopify when checkout can't run your scripts
posthog-js can't run on Shopify's checkout or thank-you page, so funnels stop at the cart. Forward customer events from a custom pixel for checkout steps, and capture the purchase from the order webhook against the distinct_id stored in a cart attribute, with an event UUID derived from the Shopify order ID. Session replay stays blind inside checkout.
PostHog users on Shopify notice the migration as a funnel cliff: product pages and carts are recorded, then the trail ends. posthog-js cannot run on checkout or the thank-you page, so session recordings stop at the cart and the purchase event that used to fire on the order status page is gone. The checkout steps are now the least observed part of the store.
Rebuild the funnel from two sources. Shopify's customer events give you checkout started, payment info submitted and checkout completed from a custom pixel, which can forward them to PostHog's capture API, though the pixel runs sandboxed and does not see your storefront's PostHog cookie directly. The dependable purchase comes from the order webhook. For both, the distinct_id has to come from the storefront: write it into a cart attribute before checkout so the order carries it, and capture the purchase server-side against that ID.
When a buyer logs in, call identify on the storefront with the Shopify customer ID, so web sessions and later orders sit on one person. Derive the event UUID deterministically from the Shopify order ID, and keep the order ID as a property, so a replayed webhook is dropped rather than counted. Expect session replay to remain blind inside checkout; that is a Shopify boundary, not a PostHog setting.
Checkout Extensibility → PostHog · what breaks
Why this join usually fails — Checkout Extensibility → PostHog
- 01
The distinct_id never reaches Checkout Extensibility
Custom scripts can no longer run on checkout or the thank-you page. Client-side conversion tags placed there are not blocked — they are simply never loaded.
- 02
Conversion tracking that silently stopped
This is the single most common live tracking failure on Shopify right now. Nothing errors. The tag simply never runs, revenue keeps arriving, and the ad platform reports a collapse that looks like a market problem.
- 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.
Checkout Extensibility → PostHog · the fix
What working looks like — Checkout Extensibility → 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
Shopify Checkout Extensibility's own records are the reference, not either dashboard.
Checkout Extensibility → PostHog · architecture
How Checkout Extensibility and PostHog actually connect
- 1
Shopify Checkout Extensibility holds the truth
Additional Scripts and script tags on the order status page are gone. Any tracking that lived there has already stopped firing or will, and the store owner usually finds out from a revenue report rather than an error.
- 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 Shopify order.
- 4
The event source decides reliability
Send orders from the webhook at the paid total. Web Pixels are the supported browser-side path and they run sandboxed, with no access to the page.
- 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.
Checkout Extensibility → PostHog · normal or broken
Working vs. broken, side by side — Checkout Extensibility → PostHog
Normal, not a fault
The distinct_id present on the order
Visible on the record itself in Shopify Checkout Extensibility, not merely captured somewhere on the site.
Sent from the Shopify order webhook, server-side
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
PostHog's count and Shopify Checkout Extensibility's records agree within a few percent over a closed window.
Actually broken
The distinct_id missing on most records
Custom scripts can no longer run on checkout or the thank-you page. Client-side conversion tags placed there are not blocked — they are simply never loaded.
Sent from the browser
This is the single most common live tracking failure on Shopify right now. Nothing errors. The tag simply never runs, revenue keeps arriving, and the ad platform reports a collapse that looks like a market problem.
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
The dashboard shows a number and no one has compared it to Shopify Checkout Extensibility.
Checkout Extensibility → PostHog · diagnose
Diagnostic order — Checkout Extensibility → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare Shopify order count against platform-reported conversions for the last 60 days
A sharp divergence with no change in actual sales is the signature. Check what was in Additional Scripts before assuming anything else.
- 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.
Checkout Extensibility → PostHog · prove
How it gets proven — Checkout Extensibility → PostHog
Against Shopify Checkout Extensibility's own records, not against either platform's dashboard.
Source of truth
Shopify orders by creation date, read from the order record rather than from anything rendered on a page.
- 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.
- Orders reconciled from the webhook against imported conversions for a settled week, with no dependence on anything rendered at checkout.
Checkout Extensibility → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Compare Shopify order count against platform-reported conversions for the last 60 days
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Shopify orders by creation date, read from the order record rather than from anything rendered on a page.
Free30 minutesNo obligation
Checkout Extensibility → PostHog · when not to buy
When you don't need this — Checkout Extensibility → PostHog
- If PostHog already reports conversions that reconcile against Shopify Checkout Extensibility's records within a few percent, this join is working and there is nothing to buy.
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- If you were already sending conversions server-side from the order webhook, this migration does not affect your tracking at all — which is exactly why server-side was worth doing before it was forced.
- 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.
Checkout Extensibility → PostHog · what we deliver
What gets built — Checkout Extensibility → PostHog
Identifier capture into Checkout Extensibility
Capture the identifier on your own storefront, persist it into cart or order attributes, and send the conversion server-side from the order webhook rather than from any page.
Event source: the Shopify order webhook, server-side
Send orders from the webhook at the paid total. Web Pixels are the supported browser-side path and they run sandboxed, with no access to the page.
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
Refunds and cancellations reverse from their own webhooks.
Written guarantee
95%+ tracking accuracy
Measured against Shopify orders by creation date, read from the order record rather than from anything rendered on a page.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Checkout Extensibility → PostHog questions, answered
No. Shopify's checkout does not run custom scripts, so recordings end at the cart. Use customer events from a custom pixel for checkout steps and the order webhook for purchases.
Write the PostHog distinct_id into a cart attribute on the storefront so it lands on the order, then send the purchase server-side with that ID.
Almost always because the distinct_id never reached the Shopify order. Custom scripts can no longer run on checkout or the thank-you page. Client-side conversion tags placed there are not blocked — they are simply never loaded. 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 Shopify order webhook, server-side. Send orders from the webhook at the paid total. Web Pixels are the supported browser-side path and they run sandboxed, with no access to the page.
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 Checkout Extensibility → PostHog
- Checkout Extensibility → Google AdsConnecting Shopify Checkout Extensibility to Google Ads
- Checkout Extensibility → MetaConnecting Shopify Checkout Extensibility to Meta Conversions API
- Checkout Extensibility → GA4Connecting Shopify Checkout Extensibility to GA4
RELATED GUIDES
Where Checkout Extensibility → PostHog fits in the rest of your tracking
- Swell → PostHogConnecting Swell to PostHog
- EDD → PostHogConnecting Easy Digital Downloads to PostHog
- WooCommerce → PostHogConnecting WooCommerce to PostHog
- Checkout Extensibility → MatomoConnecting Shopify Checkout Extensibility to Matomo
- Checkout Extensibility → MixpanelConnecting Shopify Checkout Extensibility to Mixpanel
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- Braintree → PostHogConnecting Braintree to PostHog
- Squarespace → PostHogConnecting Squarespace Commerce to PostHog
Free · 30 min
Get Checkout Extensibility and PostHog joined properly
Free30 minutesNo obligation
