Connecting RudderStack to PostHog
RudderStack routes events from your applications to every downstream tool, which makes it the single point where a naming mistake propagates simultaneously to every ad platform you run. 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 RudderStack event 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
RudderStack to PostHog: one distinct_id, not two
Running PostHog's own JavaScript alongside RudderStack's PostHog destination creates two anonymous IDs per visitor. Pick one identity source, such as passing PostHog's anonymous ID into RudderStack's event context, or identify both with the same user ID at sign-in. Send purchases from the server-side source with a stable order-derived identifier, and compare daily counts with the warehouse.
RudderStack has a PostHog destination that sends track calls as PostHog events and maps identify and alias to PostHog's person merging. The catch is that most teams also load PostHog's own JavaScript, because session replay, feature flags and autocapture only work from PostHog's library, not through a pipeline. Two libraries now generate two anonymous IDs for the same visitor, and PostHog shows two persons, with the replay on one and the purchase on the other.
Pick one source of identity. Either let PostHog's snippet own the anonymous ID and pass it into RudderStack's event context so server-side events reuse it, or identify both libraries with the same user ID the moment someone signs in and accept that pre-login activity may split. Then send purchases from RudderStack's server-side source, not from the browser, with a stable identifier you derive from the order so a retried batch does not create a second event; check whether the destination passes RudderStack's message ID as PostHog's event UUID.
If PostHog is self-hosted, you now run two pieces of ingestion infrastructure, and an event can be lost in either. RudderStack's warehouse copy is the referee: compare daily purchase counts there against PostHog's for the same days before deciding which side dropped them.
RudderStack → PostHog · what breaks
Why this join usually fails — RudderStack → PostHog
- 01
The distinct_id never reaches RudderStack
Client-side sources lose identifiers to blocking and short cookie lifetimes; server-side sources have no browser context and must be handed the identifier explicitly by the application.
- 02
One schema change, every destination wrong at once
Centralization is the point and the risk. Rename an event property in one place and every ad platform, warehouse table and email tool receives the new shape on the same afternoon.
- 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.
RudderStack → PostHog · the fix
What working looks like — RudderStack → PostHog
The distinct_id on every event
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
RudderStack → PostHog · architecture
How RudderStack and PostHog actually connect
- 1
RudderStack holds the truth
The warehouse copy is what makes a pipeline like this auditable. You can ask what was actually sent, rather than inferring it from what each destination decided to display.
- 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 RudderStack event.
- 4
The event source decides reliability
Send from your backend once the transaction is settled. A pipeline that only forwards browser events inherits every browser event's problems and adds a hop.
- 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.
RudderStack → PostHog · normal or broken
Working vs. broken, side by side — RudderStack → PostHog
Normal, not a fault
The distinct_id present on the event
Sent from the RudderStack server-side source
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
Client-side sources lose identifiers to blocking and short cookie lifetimes; server-side sources have no browser context and must be handed the identifier explicitly by the application.
Sent from the browser
Centralization is the point and the risk. Rename an event property in one place and every ad platform, warehouse table and email tool receives the new shape on the same afternoon.
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
RudderStack → PostHog · diagnose
Diagnostic order — RudderStack → PostHog
- 01
Count events carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare warehouse event counts against each destination's reported counts
Divergence localizes the fault immediately — to a transformation, to a filter, or to the destination's own deduplication.
- 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.
RudderStack → PostHog · prove
How it gets proven — RudderStack → PostHog
Source of truth
Your warehouse tables, which RudderStack writes to alongside the ad platforms — the same events, landing somewhere you can query them.
- The distinct_id confirmed present on a live event.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Warehouse purchase counts reconciled against each destination's received count for a closed window.
RudderStack → PostHog · free audit
What we check in the free audit
- Count events carrying the distinct_id
- Follow one real conversion end to end
- Compare warehouse event counts against each destination's reported counts
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Your warehouse tables, which RudderStack writes to alongside the ad platforms — the same events, landing somewhere you can query them.
Free30 minutesNo obligation
RudderStack → PostHog · when not to buy
When you don't need this — RudderStack → PostHog
- Measure identifier coverage yourself first — pull your last hundred events and count how many carry the distinct_id.
- If you have one website and one ad platform, a pipeline is infrastructure you will maintain for a benefit you do not yet have.
- 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.
RudderStack → PostHog · what we deliver
What gets built — RudderStack → PostHog
Identifier capture into RudderStack
Capture on the web source, persist against the user identity, and attach it to server-side events so a purchase recorded by your backend still knows which click preceded it.
Event source: the RudderStack server-side source
Send from your backend once the transaction is settled. A pipeline that only forwards browser events inherits every browser event's problems and adds a hop.
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
Emit an explicit reversal event on refund and route it to every destination that accepted the original.
Written guarantee
95%+ tracking accuracy
Measured against Your warehouse tables, which RudderStack writes to alongside the ad platforms — the same events, landing somewhere you can query them.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
RudderStack → PostHog questions, answered
Only for browser features such as session replay, feature flags and autocapture. If you load it, align its distinct_id with RudderStack's identifiers or each visitor becomes two persons.
The PostHog snippet and the RudderStack SDK each assigned their own anonymous ID and nothing merged them. Identify both with the same user ID at login, or pass PostHog's ID through RudderStack.
Almost always because the distinct_id never reached the RudderStack event. Client-side sources lose identifiers to blocking and short cookie lifetimes; server-side sources have no browser context and must be handed the identifier explicitly by the application. 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 RudderStack server-side source. Send from your backend once the transaction is settled. A pipeline that only forwards browser events inherits every browser event's problems and adds a hop.
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 RudderStack → PostHog
- RudderStack → Google AdsConnecting RudderStack to Google Ads
- RudderStack → MetaConnecting RudderStack to Meta Conversions API
- RudderStack → GA4Connecting RudderStack to GA4
RELATED GUIDES
Where RudderStack → PostHog fits in the rest of your tracking
- Optimizely → PostHogConnecting Optimizely to PostHog
- Tealium → PostHogConnecting Tealium to PostHog
- mParticle → PostHogConnecting mParticle to PostHog
- RudderStack → MatomoConnecting RudderStack to Matomo
- RudderStack → MixpanelConnecting RudderStack to Mixpanel
- EcommerceConversion tracking for ecommerce brands, measured against your orders
- VWO → PostHogConnecting VWO to PostHog
- Dynamic Yield → PostHogConnecting Dynamic Yield to PostHog
Free · 30 min
Get RudderStack and PostHog joined properly
Free30 minutesNo obligation
