Connecting NexHealth to PostHog
NexHealth sits between a practice website and the practice management system, syncing appointments both ways for healthcare providers. 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 NexHealth 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
NexHealth to PostHog: switch off what records the patient
First turn off or mask session replay and restrict autocapture on booking and form pages. Then read the PostHog distinct_id on the widget page, pass it into the booking as an opaque value, and from NexHealth's appointment webhook send a neutral appointment_booked event with a UUID from the appointment ID. Use PostHog Cloud only under a business associate agreement.
PostHog's risk for a practice using NexHealth comes less from the event you send and more from what PostHog records by default. Session replay and autocapture are built to capture what visitors do, and on a healthcare site that includes intake forms on your own pages and button text such as "Book emergency extraction". Turn replay off or mask every input on booking and form pages, and restrict autocapture before the snippet goes live. The NexHealth widget itself, if it loads in a cross-origin frame, is generally not recorded by replay, but confirm that in your own recordings rather than assuming it.
The conversion join is clean when done server-side. Read the PostHog distinct_id on the page hosting the widget, pass it into the booking as an opaque value, and when NexHealth's appointment webhook fires, send a capture event from your backend with that distinct_id and a UUID derived from the appointment ID so retries do not duplicate. Name it something neutral such as appointment_booked, with no appointment type property.
Self-hosting keeps all of this on infrastructure you control. For PostHog Cloud, check whether PostHog will sign a business associate agreement on your plan before any patient-linked event arrives. Without one, use PostHog for anonymous site behavior only and keep booking outcomes in the practice system.
NexHealth → PostHog · what breaks
Why this join usually fails — NexHealth → PostHog
- 01
The distinct_id never reaches NexHealth
The booking widget is embedded on your site, which is better than most healthcare booking flows, but the identifier still has to be carried into the appointment. Health information must never travel with it.
- 02
Appointment reason travelling with the identifier
A booking widget that captures reason-for-visit and passes it onward sends health information to an ad platform. The identifier must stay opaque and unaccompanied.
- 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.
- 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.
NexHealth → PostHog · the fix
What working looks like — NexHealth → 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
NexHealth → PostHog · architecture
How NexHealth and PostHog actually connect
- 1
NexHealth holds the truth
NexHealth's value is real-time availability from systems that were never designed to expose it. The appointment ultimately lives in the practice system.
- 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
The identifier is the bridge
The distinct_id, captured at the visit and carried into the NexHealth appointment.
- 4
The event source decides reliability
Send attended appointments for new patients, valued at expected patient lifetime rather than a single visit.
- 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.
NexHealth → PostHog · normal or broken
Working vs. broken, side by side — NexHealth → PostHog
Normal, not a fault
The distinct_id present on the appointment
Sent from the NexHealth appointment 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
The booking widget is embedded on your site, which is better than most healthcare booking flows, but the identifier still has to be carried into the appointment. Health information must never travel with it.
Sent from the browser
A booking widget that captures reason-for-visit and passes it onward sends health information to an ad platform. The identifier must stay opaque and unaccompanied.
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
NexHealth → PostHog · diagnose
Diagnostic order — NexHealth → PostHog
- 01
Count appointments carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Audit exactly what the widget passes onward
Confirm no appointment reason, procedure or clinical field leaves your systems.
- 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.
- 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.
NexHealth → PostHog · prove
How it gets proven — NexHealth → PostHog
Source of truth
The practice management system NexHealth syncs to — it is the sync layer, not the record of truth.
- 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.
- A written statement of what is sent, confirming no clinical field is included.
NexHealth → PostHog · free audit
What we check in the free audit
- Count appointments carrying the distinct_id
- Follow one real conversion end to end
- Audit exactly what the widget passes onward
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
The practice management system NexHealth syncs to — it is the sync layer, not the record of truth.
Free30 minutesNo obligation
NexHealth → PostHog · when not to buy
When you don't need this — NexHealth → PostHog
- Measure identifier coverage yourself first — pull your last hundred appointments and count how many carry the distinct_id.
- If your practice system already exposes appointments directly, NexHealth may be a layer you do not need in the measurement path.
- 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.
NexHealth → PostHog · what we deliver
What gets built — NexHealth → PostHog
Identifier capture into NexHealth
Pass the identifier into the widget's supported fields as an opaque value, keeping it entirely separate from any clinical or appointment-reason data.
Event source: the NexHealth appointment webhook
Send attended appointments for new patients, valued at expected patient lifetime rather than a single visit.
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 reduce the figure, and new-patient no-show rates are meaningful.
Written guarantee
95%+ tracking accuracy
Measured against The practice management system NexHealth syncs to — it is the sync layer, not the record of truth.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
NexHealth → PostHog questions, answered
Only with inputs masked and replay disabled on booking and intake pages, because replays can capture patient-entered details. Confirm in your own recordings what is and is not captured.
Pass the PostHog distinct_id into the booking as an opaque value and send a server-side event from the NexHealth webhook with a UUID based on the appointment ID. Do this only on a self-hosted instance or under a signed BAA.
Almost always because the distinct_id never reached the NexHealth appointment. The booking widget is embedded on your site, which is better than most healthcare booking flows, but the identifier still has to be carried into the appointment. Health information must never travel with it. Measure coverage before debugging the dispatch.
PostHog identifies by distinct_id with an alias call to merge anonymous and identified users. On a self-hosted instance you also control the ingestion endpoint, which means the identifier survives ad blockers that would kill a third-party pixel — one of the few genuine technical advantages available to a first-party setup.
The NexHealth appointment webhook. Send attended appointments for new patients, valued at expected patient lifetime rather than a single visit.
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.
More on NexHealth → PostHog
- NexHealth → Google AdsConnecting NexHealth to Google Ads
- NexHealth → MetaConnecting NexHealth to Meta Conversions API
- NexHealth → GA4Connecting NexHealth to GA4
Using NexHealth for bookings? How NexHealth bookings get tracked end to end
RELATED GUIDES
Where NexHealth → PostHog fits in the rest of your tracking
- Doctolib → PostHogConnecting Doctolib to PostHog
- Luma Health → PostHogConnecting Luma Health to PostHog
- Zocdoc → PostHogConnecting Zocdoc to PostHog
- NexHealth → Adobe AnalyticsConnecting NexHealth to Adobe Analytics
- NexHealth → GA4Connecting NexHealth to GA4
- DermatologyConversion tracking for dermatology, split medical from cosmetic
- Dentrix Ascend → PostHogConnecting Dentrix Ascend to PostHog
- Weave → PostHogConnecting Weave to PostHog
Free · 30 min
Get NexHealth and PostHog joined properly
Free30 minutesNo obligation
