Skip to main content
Square Online → PostHogIntegration guide

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

  1. 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.

  2. 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.

  3. 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.

  4. 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. 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. 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. 3

    The identifier is the bridge

    The distinct_id, captured at the visit and carried into the Square Online order.

  4. 4

    The event source decides reliability

    Send net of tips and taxes. Tips on food orders are substantial and are not your revenue.

  5. 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

  1. 01

    Count orders carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 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.

  4. 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.

  5. 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.

Get my free conversion tracking audit

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.

Get my free conversion tracking audit

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.

Free · 30 min

Get Square Online and PostHog joined properly

Free30 minutesNo obligation