Connecting Ghost to PostHog
Ghost is publishing with memberships attached, so the commercial event is a paid subscription rather than a purchase. 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 Ghost member 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 Ghost: from post read to confirmed member
Put PostHog in the Ghost theme and identify readers with the member UUID. Portal's hash routes let PostHog capture opens in the browser, but the magic-link confirmation creates a fresh anonymous person, so send confirmed signups from your server on the member.added webhook with the member UUID as distinct_id to close the funnel.
PostHog's distinct_id model fits Ghost better than most analytics because Ghost already has a stable person identifier: the member UUID, available in theme templates for logged-in readers. Put the PostHog snippet in the theme rather than code injection, call identify with the member UUID when a member is present, and anonymous reading before signup merges into the member once they log in on that browser.
The funnel that matters here is post viewed, Portal opened, member confirmed. Portal changes the URL hash when it opens (signup and account screens appear as hash routes), so PostHog can capture that step from the browser. The confirmation is the trap: Ghost creates the member when the magic link is clicked, often in a mail app, which gives PostHog a fresh anonymous person. Send the confirmed signup from your server on Ghost's member.added webhook with the member UUID as distinct_id, and the funnel closes regardless of which browser clicked the link.
If you self-host PostHog alongside a self-hosted Ghost, you own both outages. A missing week of signups is far more often a full disk on the ingestion box than a broken snippet.
Ghost → PostHog · what breaks
Why this join usually fails — Ghost → PostHog
- 01
The distinct_id never reaches Ghost
Signup and checkout are Ghost-hosted with limited customisation, and free members vastly outnumber paid ones. An identifier captured on a post has to survive into the member record, which Ghost only partially supports.
- 02
Free members outnumbering paid by an order of magnitude
Ghost's newsletter signup is frictionless by design. Sending free signups as conversions teaches an ad platform to find people who subscribe to free newsletters.
- 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.
Ghost → PostHog · the fix
What working looks like — Ghost → PostHog
The distinct_id on every member
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Ghost → PostHog · architecture
How Ghost and PostHog actually connect
- 1
Ghost holds the truth
Ghost's payments run through a connected Stripe account, so Stripe is authoritative for money and Ghost is authoritative for membership state. They should agree and reconciling them is worth doing once.
- 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 Ghost member.
- 4
The event source decides reliability
Send paid subscription starts at expected lifetime value. Free member signups are leads and belong in a separate event entirely.
- 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.
Ghost → PostHog · normal or broken
Working vs. broken, side by side — Ghost → PostHog
Normal, not a fault
The distinct_id present on the member
Sent from the Ghost member webhook, or the connected Stripe subscription event
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
Signup and checkout are Ghost-hosted with limited customisation, and free members vastly outnumber paid ones. An identifier captured on a post has to survive into the member record, which Ghost only partially supports.
Sent from the browser
Ghost's newsletter signup is frictionless by design. Sending free signups as conversions teaches an ad platform to find people who subscribe to free newsletters.
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
Ghost → PostHog · diagnose
Diagnostic order — Ghost → PostHog
- 01
Count members carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Check whether free and paid signups share a conversion action
If they do, the free tier is setting your bids and paid acquisition is invisible.
- 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.
Ghost → PostHog · prove
How it gets proven — Ghost → PostHog
Source of truth
Ghost's member records with paid subscription status, cross-checked against the Stripe account behind them.
- The distinct_id confirmed present on a live member.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- A paid subscription confirmed to carry lifetime value with free signups excluded.
Ghost → PostHog · free audit
What we check in the free audit
- Count members carrying the distinct_id
- Follow one real conversion end to end
- Check whether free and paid signups share a conversion action
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Ghost's member records with paid subscription status, cross-checked against the Stripe account behind them.
Free30 minutesNo obligation
Ghost → PostHog · when not to buy
When you don't need this — Ghost → PostHog
- Measure identifier coverage yourself first — pull your last hundred members and count how many carry the distinct_id.
- If your Ghost site is a free newsletter monetised by sponsorship, there is no subscription conversion to measure here.
- 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.
Ghost → PostHog · what we deliver
What gets built — Ghost → PostHog
Identifier capture into Ghost
Carry the identifier through the signup URL into member labels or via the connected Stripe checkout's metadata, and verify on a real paid signup which survives.
Event source: the Ghost member webhook, or the connected Stripe subscription event
Send paid subscription starts at expected lifetime value. Free member signups are leads and belong in a separate event entirely.
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
Subscription cancellations reverse the lifetime value claimed.
Written guarantee
95%+ tracking accuracy
Measured against Ghost's member records with paid subscription status, cross-checked against the Stripe account behind them.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Ghost → PostHog questions, answered
Call identify with the member UUID from your Ghost theme template when a member is logged in, and use the same UUID as distinct_id for server events sent from Ghost webhooks.
The magic link confirming a Ghost signup often opens in a different browser. Send the signup server-side keyed on the member UUID so it attaches to the right person.
Almost always because the distinct_id never reached the Ghost member. Signup and checkout are Ghost-hosted with limited customisation, and free members vastly outnumber paid ones. An identifier captured on a post has to survive into the member record, which Ghost only partially supports. 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 Ghost member webhook, or the connected Stripe subscription event. Send paid subscription starts at expected lifetime value. Free member signups are leads and belong in a separate event entirely.
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 Ghost → PostHog
- Ghost → PostHogConnecting Ghost memberships to PostHog
- Ghost → Google AdsConnecting Ghost to Google Ads
- Ghost → MetaConnecting Ghost to Meta Conversions API
RELATED GUIDES
Where Ghost → PostHog fits in the rest of your tracking
- Concrete CMS → PostHogConnecting Concrete CMS to PostHog
- AEM → PostHogConnecting Adobe Experience Manager to PostHog
- Statamic → PostHogConnecting Statamic to PostHog
- Ghost → MatomoConnecting Ghost memberships to Matomo
- Ghost → AmplitudeConnecting Ghost memberships to Amplitude
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Drupal Commerce → PostHogConnecting Drupal Commerce to PostHog
- Craft → PostHogConnecting Craft CMS to PostHog
Free · 30 min
Get Ghost and PostHog joined properly
Free30 minutesNo obligation
