Connecting MemberPress to PostHog
MemberPress runs memberships inside WordPress, which means you own the database and inherit every WordPress problem alongside it. 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 MemberPress subscription 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
MemberPress to PostHog: content usage that predicts churn
Use PostHog to see which members stop using what they pay for. Call identify with the WordPress user ID on the first logged-in page view, use the same distinct_id for server events from MemberPress hooks (started, renewed, payment failed, cancelled), set event UUIDs from transaction IDs, and capture content consumption in the browser to build pre-renewal churn cohorts.
PostHog is the destination here that answers a membership question, not an advertising one: which members stop using what they pay for before they cancel. The join is simple because members log in. Call identify in posthog-js with the WordPress user ID on the first logged-in page view after signup, which merges the anonymous pre-signup browsing, and use that same ID as distinct_id on server events.
From the MemberPress hooks, send membership started, renewed, payment failed and cancelled, with level, price and billing period as properties. From the browser, capture what members actually consume: lessons completed if you use MemberPress Courses, protected pages viewed, downloads. Set the event UUID on server events from the transaction ID so a retried webhook does not create a second renewal.
Then build the cohort that matters: members whose content activity dropped in the 30 days before renewal, compared with those who renewed. That is a list you can act on, unlike a conversion count. Caching does not interfere with posthog-js, but logged-in pages are usually uncached anyway, so identify will run where it needs to.
MemberPress → PostHog · what breaks
Why this join usually fails — MemberPress → PostHog
- 01
The distinct_id never reaches MemberPress
Page caching serves a cached render to the visitor, so anything relying on a dynamically populated field can silently fail. The identifier has to be captured and stored as subscription metadata server-side, not carried in a rendered page.
- 02
Caching between the visitor and your code
The same problem that breaks WooCommerce tracking. A cached page never runs your capture logic, and the failure is invisible because the site still works.
- 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.
MemberPress → PostHog · the fix
What working looks like — MemberPress → PostHog
The distinct_id on every membership
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
MemberPress → PostHog · architecture
How MemberPress and PostHog actually connect
- 1
MemberPress holds the truth
Owning the database is the advantage — you can query it directly and reconcile without depending on anyone. The disadvantage is that caching, plugin conflicts and optimisation tools sit between your visitor and your code.
- 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 MemberPress subscription.
- 4
The event source decides reliability
Fire server-side from the PHP hook, which runs regardless of caching, and value recurring memberships over their expected life.
- 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.
MemberPress → PostHog · normal or broken
Working vs. broken, side by side — MemberPress → PostHog
Normal, not a fault
The distinct_id present on the membership
Sent from the MemberPress transaction-completed hook
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
Page caching serves a cached render to the visitor, so anything relying on a dynamically populated field can silently fail. The identifier has to be captured and stored as subscription metadata server-side, not carried in a rendered page.
Sent from the browser
The same problem that breaks WooCommerce tracking. A cached page never runs your capture logic, and the failure is invisible because the site still works.
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
MemberPress → PostHog · diagnose
Diagnostic order — MemberPress → PostHog
- 01
Count memberships carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Submit a test signup through a fully cached page
Not as a logged-in admin, which bypasses the cache. If the metadata is empty on the cached path, caching is your cause.
- 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.
MemberPress → PostHog · prove
How it gets proven — MemberPress → PostHog
Source of truth
MemberPress transactions and subscriptions in your own WordPress database, for the same window.
- The distinct_id confirmed present on a live membership.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Subscription metadata confirmed populated on a signup made as an anonymous visitor through cache.
MemberPress → PostHog · free audit
What we check in the free audit
- Count memberships carrying the distinct_id
- Follow one real conversion end to end
- Submit a test signup through a fully cached page
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
MemberPress transactions and subscriptions in your own WordPress database, for the same window.
Free30 minutesNo obligation
MemberPress → PostHog · when not to buy
When you don't need this — MemberPress → PostHog
- Measure identifier coverage yourself first — pull your last hundred memberships and count how many carry the distinct_id.
- If you run no caching layer and a single membership tier, a developer can wire this in an afternoon.
- 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.
MemberPress → PostHog · what we deliver
What gets built — MemberPress → PostHog
Identifier capture into MemberPress
Capture the identifier and write it to subscription metadata through a MemberPress or WordPress hook, so it lives in your database rather than in a page that might be cached.
Event source: the MemberPress transaction-completed hook
Fire server-side from the PHP hook, which runs regardless of caching, and value recurring memberships over their expected life.
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 refunds are recorded against the subscription and should reduce the reported figure.
Written guarantee
95%+ tracking accuracy
Measured against MemberPress transactions and subscriptions in your own WordPress database, for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
MemberPress → PostHog questions, answered
The WordPress user ID, set with identify on the first logged-in page and reused on server events.
It can show members whose content usage fell before renewal, if you send both MemberPress lifecycle events and in-browser usage.
Almost always because the distinct_id never reached the MemberPress subscription. Page caching serves a cached render to the visitor, so anything relying on a dynamically populated field can silently fail. The identifier has to be captured and stored as subscription metadata server-side, not carried in a rendered page. 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 MemberPress transaction-completed hook. Fire server-side from the PHP hook, which runs regardless of caching, and value recurring memberships over their expected life.
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 MemberPress → PostHog
- MemberPress → Google AdsConnecting MemberPress to Google Ads
- MemberPress → MetaConnecting MemberPress to Meta Conversions API
- MemberPress → GA4Connecting MemberPress to GA4
RELATED GUIDES
Where MemberPress → PostHog fits in the rest of your tracking
- Kajabi → PostHogConnecting Kajabi to PostHog
- Circle → PostHogConnecting Circle to PostHog
- Teachable → PostHogConnecting Teachable to PostHog
- MemberPress → MatomoConnecting MemberPress to Matomo
- MemberPress → MixpanelConnecting MemberPress to Mixpanel
- MembershipsConversion tracking for membership communities, past the first month
- SamCart → PostHogConnecting SamCart to PostHog
- ClickFunnels → PostHogConnecting ClickFunnels to PostHog
Free · 30 min
Get MemberPress and PostHog joined properly
Free30 minutesNo obligation
