Connecting Square Online to PostHog
Square Online orders settle into the same Square account as the card taken at the counter, which is a genuine advantage: the online and in-person halves of the business are already denominated in one ledger. 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 Square Online 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 for Square Online ordering, not just order totals
Capture the PostHog distinct_id in the browser before checkout, then send completed orders from Square's order webhook through PostHog's capture API with that distinct_id, or the order email, and the Square order ID as event UUID. Send order value excluding tip and the tip separately, and mask free-text order notes before session replay.
PostHog's value for a Square Online merchant is the funnel before the order, not the order itself, which Square already records exactly. Where do people abandon: the menu, the item modifiers, the pickup-time picker, or payment? That last step is the hard one, because checkout can run on Square-hosted pages where your PostHog snippet may not load, so the funnel shows a cliff that is really a measurement gap.
Close it server-side. Capture the PostHog distinct_id in the browser before the customer reaches checkout, then send the completed order from Square's order webhook through PostHog's capture API with the same distinct_id. If you cannot carry the ID through, identify the person by the email on the order instead, and accept that anonymous menu browsing will only merge for customers who order again while identified. Use the Square order ID as the event UUID so a retried webhook does not double the day.
Session replay on a food ordering flow needs a privacy check first: order notes contain addresses, gate codes and allergy details. Mask free-text fields before recording, and never send the note text as an event property. Send the order value excluding the tip as one property and the tip as another, so a change in tipping does not look like a menu-pricing effect in any insight.
Square Online → PostHog · what breaks
Why this join usually fails — Square Online → PostHog
- 01
The distinct_id never reaches Square Online
Square Online sites are frequently on a Square-provided domain, and checkout may hand off to Square-hosted payment pages depending on configuration.
- 02
Counter sales counted as online conversions
The convenience of one ledger is also the trap. If the sales channel is not filtered, every card swipe at the register lands in your ad reporting as a conversion you paid for.
- 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.
Square Online → PostHog · the fix
What working looks like — Square Online → 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
Square Online → PostHog · architecture
How Square Online and PostHog actually connect
- 1
Square Online holds the truth
The filter is the whole job. Square's default reporting cheerfully sums counter sales and online orders, and that total is not something any ad platform should be optimizing toward.
- 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 Square Online order.
- 4
The event source decides reliability
Send net of tips and taxes. Tips on food orders are substantial and are not your revenue.
- 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.
Square Online → PostHog · normal or broken
Working vs. broken, side by side — Square Online → PostHog
Normal, not a fault
The distinct_id present on the order
Sent from the Square transaction record
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
Square Online sites are frequently on a Square-provided domain, and checkout may hand off to Square-hosted payment pages depending on configuration.
Sent from the browser
The convenience of one ledger is also the trap. If the sales channel is not filtered, every card swipe at the register lands in your ad reporting as a conversion you paid for.
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
Square Online → PostHog · diagnose
Diagnostic order — Square Online → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Filter by sales channel and re-check the total
Compare the filtered online total against Square Online's own order count. If they disagree, the filter is wrong before the tracking is.
- 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.
Square Online → PostHog · prove
How it gets proven — Square Online → PostHog
Source of truth
Square transactions filtered to the online sales channel, by location.
- 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.
- Online-channel transactions reconciled against imported conversions for a settled week.
Square Online → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Filter by sales channel and re-check the total
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Square transactions filtered to the online sales channel, by location.
Free30 minutesNo obligation
Square Online → PostHog · when not to buy
When you don't need this — Square Online → PostHog
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- If Square Online is a small side channel next to your counter business, measure it on order count and do not build an import for it.
- 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.
Square Online → PostHog · what we deliver
What gets built — Square Online → PostHog
Identifier capture into Square Online
Persist the identifier in first-party storage on your own domain before the handoff, and reattach it to the order at the point the transaction is written.
Event source: the Square transaction record
Send net of tips and taxes. Tips on food orders are substantial and are not your revenue.
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 appear in Square as their own records and should be sent as reversals.
Written guarantee
95%+ tracking accuracy
Measured against Square transactions filtered to the online sales channel, by location.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Square Online → PostHog questions, answered
Check whether your Square Online plan allows custom code on the storefront; checkout pages hosted by Square may not run it at all. Send completed orders server-side from Square webhooks to fill that gap.
Carry the browser's distinct_id to the order if you can, or identify by the email on the order. Use the Square order ID as the event UUID to avoid duplicates on retries.
Almost always because the distinct_id never reached the Square Online order. Square Online sites are frequently on a Square-provided domain, and checkout may hand off to Square-hosted payment pages depending on configuration. 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 Square transaction record. Send net of tips and taxes. Tips on food orders are substantial and are not your revenue.
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 Square Online → PostHog
- Square Online → Google AdsConnecting Square Online to Google Ads
- Square Online → MetaConnecting Square Online to Meta Conversions API
- Square Online → GA4Connecting Square Online to GA4
RELATED GUIDES
Where Square Online → PostHog fits in the rest of your tracking
- Otter → PostHogConnecting Otter to PostHog
- Uber Eats → PostHogConnecting Uber Eats to PostHog
- Toast → PostHogConnecting Toast to PostHog
- Square Online → MixpanelConnecting Square Online to Mixpanel
- Square Online → AmplitudeConnecting Square Online to Amplitude
- RestaurantsConversion tracking for restaurants, across reservations, orders and calls
- DoorDash → PostHogConnecting DoorDash to PostHog
- Slice → PostHogConnecting Slice to PostHog
Free · 30 min
Get Square Online and PostHog joined properly
Free30 minutesNo obligation
