Connecting Squarespace Commerce to PostHog
Squarespace prioritises design simplicity over extensibility, so what you can instrument is bounded by what the platform chooses to expose. 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 Squarespace 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 on Squarespace: identify buyers on the confirmation page
Load PostHog through Code Injection, then on the order confirmation page call identify with the buyer's email and capture the purchase with the Squarespace order ID. Add a server capture from the order webhook using that order ID as event UUID and the same normalized email as distinct_id. Mask inputs and keep replay off the confirmation page.
PostHog's snippet loads on a Squarespace site through Code Injection and records product pages, cart and blog well. Checkout itself is the part your code cannot see in detail, so a PostHog funnel shows a gap between checkout start and purchase. The order confirmation page injection closes it: call identify there with the buyer's email, or your own hashed version of it, and capture the purchase with the Squarespace order ID, so the anonymous browsing merges into a known person.
Add a server-side capture from Squarespace's order webhook for the orders where the confirmation page did not run, using the same order ID as the event UUID so PostHog does not count both. The server event needs the same distinct_id as the browser, and the simplest way to get that is to identify on the email in both places, normalized identically.
Session replay on Squarespace templates is useful for one specific question: whether shoppers find the variant selector and add-to-cart button on mobile, which some templates place awkwardly. Mask input fields before turning replay on, and keep it off the confirmation page, which prints the customer's name and address. If nobody on the team will act on funnel or replay findings, Squarespace's built-in analytics already answers how many orders came from where.
Squarespace → PostHog · what breaks
Why this join usually fails — Squarespace → PostHog
- 01
The distinct_id never reaches Squarespace
Checkout runs on Squarespace's infrastructure with limited script access, so an identifier held in a cookie on your pages does not reliably reach the order. What survives has to be tested rather than assumed.
- 02
Platform limits mistaken for implementation failures
Squarespace restricts what runs at checkout by design. A setup that works on Shopify will not simply port, and the gap is the platform rather than the build.
- 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.
Squarespace → PostHog · the fix
What working looks like — Squarespace → 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
Squarespace Commerce's own records are the reference, not either dashboard.
Squarespace → PostHog · architecture
How Squarespace and PostHog actually connect
- 1
Squarespace Commerce holds the truth
Squarespace holds the order cleanly. The constraint is access — code injection is limited and checkout customisation more so, which caps what a browser-side approach can achieve.
- 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 Squarespace order.
- 4
The event source decides reliability
Send from the webhook rather than the confirmation page, which has restricted script access and may not run what you expect.
- 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.
Squarespace → PostHog · normal or broken
Working vs. broken, side by side — Squarespace → PostHog
Normal, not a fault
The distinct_id present on the order
Visible on the record itself in Squarespace Commerce, not merely captured somewhere on the site.
Sent from the Squarespace 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
PostHog's count and Squarespace Commerce's records agree within a few percent over a closed window.
Actually broken
The distinct_id missing on most records
Checkout runs on Squarespace's infrastructure with limited script access, so an identifier held in a cookie on your pages does not reliably reach the order. What survives has to be tested rather than assumed.
Sent from the browser
Squarespace restricts what runs at checkout by design. A setup that works on Shopify will not simply port, and the gap is the platform rather than the build.
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 Squarespace Commerce.
Squarespace → PostHog · diagnose
Diagnostic order — Squarespace → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Test what actually reaches the order record
One real purchase tells you more than the documentation about what this platform preserves.
- 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.
Squarespace → PostHog · prove
How it gets proven — Squarespace → PostHog
Against Squarespace Commerce's own records, not against either platform's dashboard.
Source of truth
Squarespace's order records for the same window.
- 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 test purchase with the identifier confirmed retrievable from the Squarespace order.
Squarespace → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Test what actually reaches the order record
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Squarespace's order records for the same window.
Free30 minutesNo obligation
Squarespace → PostHog · when not to buy
When you don't need this — Squarespace → PostHog
- If PostHog already reports conversions that reconcile against Squarespace Commerce'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.
- For a small Squarespace store, the native integrations plus honest reporting may be the right answer — the platform's ceiling is real.
- 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.
Squarespace → PostHog · what we deliver
What gets built — Squarespace → PostHog
Identifier capture into Squarespace
Capture the identifier and pass it through the supported order form fields or the commerce API, verifying on a real order which values persist.
Event source: the Squarespace order webhook
Send from the webhook rather than the confirmation page, which has restricted script access and may not run what you expect.
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 are recorded against the order.
Written guarantee
95%+ tracking accuracy
Measured against Squarespace's order records for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Squarespace → PostHog questions, answered
Yes, by capturing the purchase in the order confirmation page injection and identifying the buyer there, plus a server-side copy from the order webhook. Use the Squarespace order ID to deduplicate.
PostHog cannot fully observe the checkout pages. Capture the purchase on the confirmation page so the funnel has an end step.
Almost always because the distinct_id never reached the Squarespace order. Checkout runs on Squarespace's infrastructure with limited script access, so an identifier held in a cookie on your pages does not reliably reach the order. What survives has to be tested rather than assumed. 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 Squarespace order webhook. Send from the webhook rather than the confirmation page, which has restricted script access and may not run what you expect.
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 Squarespace → PostHog
- Squarespace → Google AdsConnecting Squarespace Commerce to Google Ads
- Squarespace → MetaConnecting Squarespace Commerce to Meta Conversions API
- Squarespace → GA4Connecting Squarespace Commerce to GA4
RELATED GUIDES
Where Squarespace → PostHog fits in the rest of your tracking
- BigCommerce → PostHogConnecting BigCommerce to PostHog
- Magento → PostHogConnecting Magento to PostHog
- EDD → PostHogConnecting Easy Digital Downloads to PostHog
- Squarespace → MixpanelConnecting Squarespace Commerce to Mixpanel
- Squarespace → MatomoConnecting Squarespace Commerce to Matomo
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- Checkout Extensibility → PostHogConnecting Shopify Checkout Extensibility to PostHog
- Shopify POS → PostHogConnecting Shopify POS to PostHog
Free · 30 min
Get Squarespace and PostHog joined properly
Free30 minutesNo obligation
