Connecting Umbraco to PostHog
Umbraco is a .NET CMS common in mid-market and enterprise European organisations, which means IT governance is usually the binding constraint rather than technology. 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 Umbraco Commerce 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
Umbraco Commerce purchases into PostHog with one distinct_id
Choose PostHog's EU cloud or self-hosting with legal before setup. Call identify with a stable ID such as the Umbraco Member key at login or checkout, store it on the Commerce order, and send the purchase from the order-finalized handler with that distinct_id, an order-derived event UUID, total and currency. Avoid firing from cached confirmation views.
PostHog suits Umbraco teams that want product analytics without sending data to a US cloud: PostHog offers an EU-hosted cloud, and self-hosting is possible. Confirm which one legal has approved before choosing the ingestion host, because changing it later means another trip through change control.
The join is the distinct_id. The browser snippet creates an anonymous one; when a visitor logs in as an Umbraco Member or reaches checkout, call identify with a stable ID such as the member key, and store the same value on the Commerce order. Then send the purchase from the order-finalized notification handler using that distinct_id, an event UUID derived from the order number so retries do not duplicate, and the order total and currency as properties.
Do not fire the purchase from the confirmation view: it may come from output cache, and PostHog autocapture on a cached page records something, just not reliably the right order. Check whether a maintained .NET client fits your Umbraco version or simply post to the capture API over HTTP; either works from a notification handler.
Umbraco → PostHog · what breaks
Why this join usually fails — Umbraco → PostHog
- 01
The distinct_id never reaches Umbraco
Output caching and CDN layers sit in front of most Umbraco deployments, and the deployment process itself frequently prevents quick iteration, which means getting the capture right the first time matters more here.
- 02
Change control, not technology
The build is straightforward and the release cycle is not. Scope the deployment process before committing to a timeline, because in this segment it is the schedule.
- 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.
Umbraco → PostHog · the fix
What working looks like — Umbraco → PostHog
The distinct_id on every order
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Umbraco → PostHog · architecture
How Umbraco and PostHog actually connect
- 1
Umbraco holds the truth
You own the database. What you may not own is the release process — Umbraco sites in this segment often sit behind change control that adds weeks to any modification.
- 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 Umbraco Commerce order.
- 4
The event source decides reliability
Fire from the .NET notification handler rather than a view, which may be cached at the edge.
- 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.
Umbraco → PostHog · normal or broken
Working vs. broken, side by side — Umbraco → PostHog
Normal, not a fault
The distinct_id present on the order
Sent from the Umbraco Commerce order-finalised notification
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
Output caching and CDN layers sit in front of most Umbraco deployments, and the deployment process itself frequently prevents quick iteration, which means getting the capture right the first time matters more here.
Sent from the browser
The build is straightforward and the release cycle is not. Scope the deployment process before committing to a timeline, because in this segment it is the schedule.
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
Umbraco → PostHog · diagnose
Diagnostic order — Umbraco → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Establish the deployment and change-control process first
It determines the timeline more than any technical question here.
- 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.
Umbraco → PostHog · prove
How it gets proven — Umbraco → PostHog
Source of truth
Umbraco Commerce's order records in your own database, at agreed order states.
- The distinct_id confirmed present on a live order.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Order data confirmed populated on an order placed through the CDN as an anonymous visitor.
Umbraco → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Establish the deployment and change-control process first
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Umbraco Commerce's order records in your own database, at agreed order states.
Free30 minutesNo obligation
Umbraco → PostHog · when not to buy
When you don't need this — Umbraco → PostHog
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- If the site is maintained by an internal IT team on a quarterly release cycle, plan the engagement around that rather than around the code.
- 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.
Umbraco → PostHog · what we deliver
What gets built — Umbraco → PostHog
Identifier capture into Umbraco
Capture the identifier and persist it to the order through a server-side notification handler in the application.
Event source: the Umbraco Commerce order-finalised notification
Fire from the .NET notification handler rather than a view, which may be cached at the edge.
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
Order state changes to refunded or cancelled are recorded.
Written guarantee
95%+ tracking accuracy
Measured against Umbraco Commerce's order records in your own database, at agreed order states.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Umbraco → PostHog questions, answered
Call identify in the browser with the member key at login, then use that same key as the distinct_id when your server sends the purchase from the order handler.
PostHog offers an EU cloud region and self-hosting; confirm which one your data protection review approved before setting the ingestion host.
Almost always because the distinct_id never reached the Umbraco Commerce order. Output caching and CDN layers sit in front of most Umbraco deployments, and the deployment process itself frequently prevents quick iteration, which means getting the capture right the first time matters more here. 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 Umbraco Commerce order-finalised notification. Fire from the .NET notification handler rather than a view, which may be cached at the edge.
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 Umbraco → PostHog
- Umbraco → Google AdsConnecting Umbraco to Google Ads
- Umbraco → MetaConnecting Umbraco to Meta Conversions API
- Umbraco → GA4Connecting Umbraco to GA4
RELATED GUIDES
Where Umbraco → PostHog fits in the rest of your tracking
- Drupal Commerce → PostHogConnecting Drupal Commerce to PostHog
- Ghost → PostHogConnecting Ghost memberships to PostHog
- Duda → PostHogConnecting Duda to PostHog
- Umbraco → Adobe AnalyticsConnecting Umbraco to Adobe Analytics
- Umbraco → GA4Connecting Umbraco to GA4
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Contentful → PostHogConnecting Contentful to PostHog
- AEM → PostHogConnecting Adobe Experience Manager to PostHog
Free · 30 min
Get Umbraco and PostHog joined properly
Free30 minutesNo obligation
