Skip to main content
Square → PostHogIntegration guide

Connecting Square to PostHog

Square holds the transaction, and for most Square businesses the majority of those transactions are a card tapped at a counter with no browser anywhere near them. 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 payment or 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

Square to PostHog: build a UUID from the Square payment ID

Capture completed Square payments from the webhook against the distinct_id you identified on your site, with amount, channel and location. Derive a deterministic name-based UUID from the Square payment ID so retries are dropped. Name in-store payments as a separate event, and measure what share of Square Online orders matched a known distinct_id.

PostHog is useful to a Square Online store or a booking-led business for the part Square does not show: how visitors move through your pages before they reach Square's hosted checkout or booking site. Session replay and funnels stop at that hop, so the purchase has to come back from your server.

Capture the Square payment from the webhook once it completes, against the same distinct_id you identified on your site, with amount, channel and location as properties. For deduplication PostHog accepts an event UUID, and Square payment IDs are not UUIDs; derive a deterministic one from the payment ID (a name-based UUID works) so a retried webhook produces the same UUID and is dropped rather than duplicated.

Name in-store payments as a separate event from online orders, and keep both in properties you can filter. A funnel from landing page to purchase that silently includes counter payments by identified customers will report conversion rates no web page earned. The join itself only exists where you identified the visitor, usually by email at a sign-up or booking, so measure what share of Square Online orders matched a known distinct_id before reading any funnel built on them.

Square → PostHog · what breaks

Why this join usually fails — Square → PostHog

  1. 01

    The distinct_id never reaches Square

    Square Online checkout is hosted, so the identifier must be carried deliberately rather than by cookie. For in-person payments there is no identifier at all unless the customer booked an appointment or is in the customer directory — a walk-in who taps a card cannot be joined to an ad click by anyone.

  2. 02

    Most of the revenue has no browser

    A card at a terminal has no click, no session and no identifier. That is a boundary to measure rather than a bug to fix, and the honest deliverable includes how much of your revenue sits outside it.

  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 → PostHog · the fix

What working looks like — Square → PostHog

  • The distinct_id on every transaction

  • 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 → PostHog · architecture

How Square and PostHog actually connect

  1. 1

    Square holds the truth

    Square records every payment with its amount, channel and, where the customer is identified, a link to the customer directory. That directory is the only bridge between a counter payment and anything that happened online.

  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 payment or order.

  4. 4

    The event source decides reliability

    Subscribe to payment and order events and send from your server. This covers online orders cleanly, and covers in-person payments only for the share you can join to an identity.

  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 → PostHog · normal or broken

Working vs. broken, side by side — Square → PostHog

Normal, not a fault

  • The distinct_id present on the transaction

  • Sent from the Square payment 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

    Square Online checkout is hosted, so the identifier must be carried deliberately rather than by cookie. For in-person payments there is no identifier at all unless the customer booked an appointment or is in the customer directory — a walk-in who taps a card cannot be joined to an ad click by anyone.

  • Sent from the browser

    A card at a terminal has no click, no session and no identifier. That is a boundary to measure rather than a bug to fix, and the honest deliverable includes how much of your revenue sits outside it.

  • 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 → PostHog · diagnose

Diagnostic order — Square → PostHog

  1. 01

    Count transactions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Split Square revenue by channel before anything else

    Online versus in-person. Every subsequent number depends on that split, and blending them makes both unreadable.

  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 → PostHog · prove

How it gets proven — Square → PostHog

Source of truth

Square's transaction list, split by channel — online and in-person are different questions.

  • The distinct_id confirmed present on a live transaction.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • The in-person join rate measured and stated as a number before any coverage claim is made.

Square → PostHog · free audit

What we check in the free audit

  • Count transactions carrying the distinct_id
  • Follow one real conversion end to end
  • Split Square revenue by channel before anything else
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Square's transaction list, split by channel — online and in-person are different questions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Square → PostHog · when not to buy

When you don't need this — Square → PostHog

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the distinct_id.
  • If nearly all your revenue is in person with no appointments and no identified customers, there is very little here to attribute and we will say so rather than build a bridge to nothing.
  • 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 → PostHog · what we deliver

What gets built — Square → PostHog

  • Identifier capture into Square

    Capture the click identifier and carry it into Square Online checkout, and for in-person work use an appointment booking as the bridge so the eventual payment can be joined through the customer record.

  • Event source: the Square payment webhook

    Subscribe to payment and order events and send from your server. This covers online orders cleanly, and covers in-person payments only for the share you can join to an identity.

  • 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

    Square exposes refunds clearly, and in hospitality and services voids and comps are frequent enough that wiring the reversal matters.

Written guarantee

95%+ tracking accuracy

Measured against Square's transaction list, split by channel — online and in-person are different questions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Square → PostHog questions, answered

Capture them server-side with an event UUID derived from the Square payment ID, so webhook retries reuse the same UUID.

Free · 30 min

Get Square and PostHog joined properly

Free30 minutesNo obligation