Skip to main content
Treatwell → PostHogIntegration guide

Connecting Treatwell to PostHog

Treatwell is a beauty marketplace with a salon booking system attached, so most of the bookings flowing through it were generated by Treatwell rather than by you. 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 Treatwell booking 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 a salon site where Treatwell takes the booking

PostHog can measure how many site visitors open the Treatwell widget, but the booking steps run in Treatwell-served code. To close the funnel, send completed bookings from Treatwell data to the capture API with the browser's distinct_id, matched by email, using the booking reference as event UUID. Keep marketplace bookings out.

PostHog is product analytics, so its natural question for a salon is narrow: of the people who reach your site, how many open the Treatwell widget and how many finish a booking? That funnel is worth having, because the widget is the only part of your site that earns money, and PostHog's session data can show where on the page people give up.

The gap is that the booking steps run inside Treatwell-served code your PostHog snippet does not instrument, so the funnel stops at the widget opening. Closing it means reading completed bookings from your Treatwell data and sending them to the capture API against the distinct_id the browser had, which needs a join key: the client email, known to PostHog only if the visitor gave it to you on your own page first. Most do not, so expect to close a minority of funnels this way.

Use the Treatwell booking reference as the event UUID so a re-run import does not duplicate, send net value as a property, and keep marketplace bookings out of PostHog, since those clients never touched your site. Self-hosting PostHog for one salon is more maintenance than the data is worth; the cloud product is the sensible default.

Treatwell → PostHog · what breaks

Why this join usually fails — Treatwell → PostHog

  1. 01

    The distinct_id never reaches Treatwell

    The widget is Treatwell-served, and marketplace bookings originate entirely inside Treatwell.

  2. 02

    Commission and discount both omitted from the value

    A marketplace booking at a promotional rate, minus new-client commission, can be worth half its headline price. Import the headline and the channel looks twice as good as it is.

  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.

Treatwell → PostHog · the fix

What working looks like — Treatwell → PostHog

  • The distinct_id on every booking

  • Conversions arriving in PostHog

    The event lands on the person profile and becomes available in insights, funnels and session replay.

  • Reconciled against the source

Treatwell → PostHog · architecture

How Treatwell and PostHog actually connect

  1. 1

    Treatwell holds the truth

    Marketplace bookings carry a commission on new clients and often a promotional discount as well. Two deductions, both invisible if you import the headline price.

  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 Treatwell booking.

  4. 4

    The event source decides reliability

    Send completed appointments net of commission and discount.

  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.

Treatwell → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the booking

  • Sent from the Treatwell booking 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

    The widget is Treatwell-served, and marketplace bookings originate entirely inside Treatwell.

  • Sent from the browser

    A marketplace booking at a promotional rate, minus new-client commission, can be worth half its headline price. Import the headline and the channel looks twice as good as it is.

  • 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

Treatwell → PostHog · diagnose

Diagnostic order — Treatwell → PostHog

  1. 01

    Count bookings carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Reconcile against the payout, not the booking

    The payout report is the only place where both deductions have already been applied.

  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.

Treatwell → PostHog · prove

How it gets proven — Treatwell → PostHog

Source of truth

Treatwell bookings by service date, split between your own booking widget and the Treatwell marketplace.

  • The distinct_id confirmed present on a live booking.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Own-widget bookings reconciled net against imported conversions, with marketplace volume reported separately.

Treatwell → PostHog · free audit

What we check in the free audit

  • Count bookings carrying the distinct_id
  • Follow one real conversion end to end
  • Reconcile against the payout, not the booking
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Treatwell bookings by service date, split between your own booking widget and the Treatwell marketplace.

Get my free conversion tracking audit

Free30 minutesNo obligation

Treatwell → PostHog · when not to buy

When you don't need this — Treatwell → PostHog

  • Measure identifier coverage yourself first — pull your last hundred bookings and count how many carry the distinct_id.
  • If Treatwell is purely a client-acquisition marketplace for you, evaluate it on commission economics rather than building a tracking integration.
  • 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.

Treatwell → PostHog · what we deliver

What gets built — Treatwell → PostHog

  • Identifier capture into Treatwell

    Attribute widget bookings placed from your own site; report marketplace volume separately with its commission stated.

  • Event source: the Treatwell booking record

    Send completed appointments net of commission and discount.

  • 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

    Cancellations and no-shows reverse.

Written guarantee

95%+ tracking accuracy

Measured against Treatwell bookings by service date, split between your own booking widget and the Treatwell marketplace.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Treatwell → PostHog questions, answered

No, those steps run in Treatwell's code. PostHog sees the widget open on your page; completed bookings have to be sent server-side from your Treatwell data.

Free · 30 min

Get Treatwell and PostHog joined properly

Free30 minutesNo obligation