Skip to main content
Square → SegmentIntegration guide

Connecting Square to Segment

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. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the Square payment or order before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Square into Segment: online orders and identified counter payments

Turn Square payment and order webhooks into server-side Order Completed events, with the Square payment ID as messageId, amount converted from the smallest currency unit, channel and location as properties, and userId resolved through customer_id. Call identify before Square Online's hosted checkout, and use destination filters so in-person sales never reach ad destinations.

Segment pays off for a Square business with genuine fan-out, such as a multi-location retailer feeding an email tool, two ad networks and a warehouse. Online, analytics.js sets the anonymousId and captures click identifiers. At checkout on Square Online the identity has to be carried deliberately, so call identify with your user ID or the shopper's email before the hand-off to Square's hosted checkout.

Server-side, turn Square's payment and order webhooks into Order Completed events with a messageId from the Square payment ID, the amount converted from the smallest currency unit, channel and location ID as properties, and the userId resolved through Square's customer_id. Payments with no customer_id should still go to the warehouse, with no userId, and stay out of ad destinations: an anonymous counter sale has nobody for an ad platform to match.

The specific hazard is channel mixing downstream. Every Segment destination receives Order Completed and may count it; if counter payments reach an ad destination with a regular's hashed email from the directory, a platform may claim a sale from someone who never clicked. Use a channel property and destination filters so in-person sales only reach destinations meant to see them, and pass consent state from the site as context.

Square → Segment · what breaks

Why this join usually fails — Square → Segment

  1. 01

    The userId and anonymousId 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

    One bad event multiplied across every destination

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  4. 04

    Nothing reconciles afterwards

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

Square → Segment · the fix

What working looks like — Square → Segment

  • The userId and anonymousId on every transaction

  • Conversions arriving in Segment

    Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.

  • Reconciled against the source

Square → Segment · architecture

How Square and Segment 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

    Segment needs a click to match

    Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.

  3. 3

    The identifier is the bridge

    The userId and anonymousId, 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

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

Square → Segment · normal or broken

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

Normal, not a fault

  • The userId and anonymousId present on the transaction

  • Sent from the Square payment webhook

  • Deduplicated correctly

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

  • Reconciles with the source

Actually broken

  • The userId and anonymousId 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

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  • Nobody has reconciled it

Square → Segment · diagnose

Diagnostic order — Square → Segment

  1. 01

    Count transactions carrying the userId and anonymousId

  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 identity resolution before checking anything downstream

    If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.

  5. 05

    Read the match rate, not the success message

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

Square → Segment · prove

How it gets proven — Square → Segment

Source of truth

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

  • The userId and anonymousId confirmed present on a live transaction.
  • An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
  • The in-person join rate measured and stated as a number before any coverage claim is made.

Square → Segment · free audit

What we check in the free audit

  • Count transactions carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Split Square revenue by channel before anything else
  • Check identity resolution before checking anything downstream
  • 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 → Segment · when not to buy

When you don't need this — Square → Segment

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the userId and anonymousId.
  • 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 send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.

Square → Segment · what we deliver

What gets built — Square → Segment

  • 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 Segment

    Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.

  • 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 → Segment questions, answered

Subscribe to Square payment and order webhooks and send Order Completed track calls from your server, using the Square payment ID as the messageId.

Free · 30 min

Get Square and Segment joined properly

Free30 minutesNo obligation