Skip to main content
Doctolib → PostHogIntegration guide

Connecting Doctolib to PostHog

Doctolib is a patient-facing marketplace as much as a booking system, so a large share of the appointments it produces were found by Doctolib 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 Doctolib appointment 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 Doctolib practice site: masking before measuring

Run PostHog on its EU cloud or self-hosted and treat the click to Doctolib as the funnel's last event. Strip outbound Doctolib URLs, which include specialty, before sending, disable autocapture on condition pages and mask all inputs in session replay. Never identify patients by email; compare anonymous button clicks weekly with attended appointments from the practice system.

PostHog can show where patients drop out before reaching your booking button, which is useful because everything after the button happens on Doctolib's domain. Run it on PostHog's EU cloud or self-hosted, and treat the click to Doctolib as the last event in the funnel, not as a booking.

Autocapture is the part to configure first. It records clicked elements and link targets, and Doctolib profile URLs typically include the specialty and city, so a default setup stores 'clicked a dermatology booking link' against a distinct_id. Strip or generalize outbound URLs in a before-send step, disable autocapture on condition pages, and mask all inputs and text in session replay, including symptom checkers and contact forms.

Do not call identify with a patient's email or merge distinct_ids with practice records. The value of PostHog here is anonymous funnel analysis by landing page and campaign, and identifying people adds health data without adding a single conversion you could see. Keep attended appointments in the practice system, split by own-site versus directory, and compare them to PostHog's button-click counts by week.

Doctolib → PostHog · what breaks

Why this join usually fails — Doctolib → PostHog

  1. 01

    The distinct_id never reaches Doctolib

    Booking happens on Doctolib's domain, and directory bookings never touch any property of yours at all.

  2. 02

    Marketplace demand read as campaign performance

    Doctolib's directory fills calendars independently of anything you spend. Pool the two and your advertising takes credit for the platform's own reach.

  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.

Doctolib → PostHog · the fix

What working looks like — Doctolib → PostHog

  • The distinct_id on every appointment

  • Conversions arriving in PostHog

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

  • Reconciled against the source

Doctolib → PostHog · architecture

How Doctolib and PostHog actually connect

  1. 1

    Doctolib holds the truth

    Directory-sourced patients are real and are not evidence that your advertising worked. Under European rules the consent position on health data is also stricter than most advertisers assume.

  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 Doctolib appointment.

  4. 4

    The event source decides reliability

    Send attended appointments as a count, per practice, with no specialty or reason-for-visit field.

  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.

Doctolib → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the appointment

  • Sent from your practice system

  • 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

    Booking happens on Doctolib's domain, and directory bookings never touch any property of yours at all.

  • Sent from the browser

    Doctolib's directory fills calendars independently of anything you spend. Pool the two and your advertising takes credit for the platform's own reach.

  • 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

Doctolib → PostHog · diagnose

Diagnostic order — Doctolib → PostHog

  1. 01

    Count appointments carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Split appointments by booking origin

    Own site versus directory. Without it the paid numbers cannot be interpreted in either direction.

  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.

Doctolib → PostHog · prove

How it gets proven — Doctolib → PostHog

Source of truth

Attended appointments in your own system, split by whether the patient came through your site or through Doctolib's directory.

  • The distinct_id confirmed present on a live appointment.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Own-site attended appointments reconciled against imported conversions, with directory volume reported separately.

Doctolib → PostHog · free audit

What we check in the free audit

  • Count appointments carrying the distinct_id
  • Follow one real conversion end to end
  • Split appointments by booking origin
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Attended appointments in your own system, split by whether the patient came through your site or through Doctolib's directory.

Get my free conversion tracking audit

Free30 minutesNo obligation

Doctolib → PostHog · when not to buy

When you don't need this — Doctolib → PostHog

  • Measure identifier coverage yourself first — pull your last hundred appointments and count how many carry the distinct_id.
  • If the directory fills your calendar already, the honest recommendation is to skip advertising rather than to measure it better.
  • 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.

Doctolib → PostHog · what we deliver

What gets built — Doctolib → PostHog

  • Identifier capture into Doctolib

    Attribute only bookings that began on your own site, and then only with a consented identifier and no clinical detail attached.

  • Event source: your practice system

    Send attended appointments as a count, per practice, with no specialty or reason-for-visit field.

  • 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 Attended appointments in your own system, split by whether the patient came through your site or through Doctolib's directory.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Doctolib → PostHog questions, answered

No. PostHog sees visits and the click to Doctolib on your site; the booking itself is confirmed on Doctolib's domain.

Free · 30 min

Get Doctolib and PostHog joined properly

Free30 minutesNo obligation