Connecting MemberPress to Segment
MemberPress runs memberships inside WordPress, which means you own the database and inherit every WordPress problem alongside it. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the MemberPress subscription before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
MemberPress to Segment: tie the browser anonymousId to the WP user
When a member signs up, read the ajs_anonymous_id cookie in the MemberPress signup POST and send Segment an identify call with the WordPress user ID as userId plus that anonymousId. Send subscriptions, payments with a renewal flag, refunds and cancellations from hooks through Segment's PHP library, with messageId built from MemberPress transaction or subscription IDs.
Segment's identity model fits MemberPress well, provided the alias happens on the server. Analytics.js on your WordPress pages sets an anonymousId in the ajs_anonymous_id cookie, cached pages included. When someone signs up, the form's POST request reaches PHP regardless of caching, so read that cookie there and send an identify call with the WordPress user ID as userId and the anonymousId alongside. That single call joins every pre-signup visit to the member.
Send the business events from MemberPress hooks through Segment's PHP library or HTTP API rather than from the browser: a subscription started, each payment with a renewal flag, refunds and cancellations, each with a messageId built from the MemberPress transaction or subscription ID. A gateway retry that fires the hook twice then produces the same messageId, which Segment can drop before it reaches a single destination.
Avoid calling identify in the browser from theme templates. A page cache that stores a logged-in render can replay one member's userId to other visitors, and through Segment that mistake reaches every connected destination at once. Pass the visitor's consent choice as a property on the server events so ad destinations downstream can honor it.
MemberPress → Segment · what breaks
Why this join usually fails — MemberPress → Segment
- 01
The userId and anonymousId 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
One bad event multiplied across every destination
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
- 04
Nothing reconciles afterwards
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
MemberPress → Segment · the fix
What working looks like — MemberPress → Segment
The userId and anonymousId on every membership
Conversions arriving in Segment
Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.
Reconciled against the source
MemberPress → Segment · architecture
How MemberPress and Segment 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
Segment needs a click to match
Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.
- 3
The identifier is the bridge
The userId and anonymousId, 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
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
MemberPress → Segment · normal or broken
Working vs. broken, side by side — MemberPress → Segment
Normal, not a fault
The userId and anonymousId present on the membership
Sent from the MemberPress transaction-completed hook
Deduplicated correctly
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
Reconciles with the source
Actually broken
The userId and anonymousId 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
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
Nobody has reconciled it
MemberPress → Segment · diagnose
Diagnostic order — MemberPress → Segment
- 01
Count memberships carrying the userId and anonymousId
- 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 identity resolution before checking anything downstream
If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.
- 05
Read the match rate, not the success message
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
MemberPress → Segment · prove
How it gets proven — MemberPress → Segment
Source of truth
MemberPress transactions and subscriptions in your own WordPress database, for the same window.
- The userId and anonymousId confirmed present on a live membership.
- An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
- Subscription metadata confirmed populated on a signup made as an anonymous visitor through cache.
MemberPress → Segment · free audit
What we check in the free audit
- Count memberships carrying the userId and anonymousId
- Follow one real conversion end to end
- Submit a test signup through a fully cached page
- Check identity resolution before checking anything downstream
- 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 → Segment · when not to buy
When you don't need this — MemberPress → Segment
- Measure identifier coverage yourself first — pull your last hundred memberships and count how many carry the userId and anonymousId.
- If you run no caching layer and a single membership tier, a developer can wire this in an afternoon.
- If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.
MemberPress → Segment · what we deliver
What gets built — MemberPress → Segment
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 Segment
Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.
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 → Segment questions, answered
On the signup request, read the ajs_anonymous_id cookie in PHP and include it with the WordPress user ID in a server-side identify call. The signup POST reaches PHP even when pages are cached.
Payments, renewals and cancellations from the server via MemberPress hooks, since caching and ad blockers make browser calls unreliable. Keep the browser for page views.
Almost always because the userId and anonymousId 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.
Segment identifies people by anonymousId before they are known and userId afterwards, and the alias between them is what stitches a session to a customer. Click identifiers travel as event properties or traits rather than as a matching key — Segment does not match anything itself, it forwards. That distinction changes the whole design: get the identity resolution right and every downstream destination inherits it.
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.
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
More on MemberPress → Segment
- MemberPress → Google AdsConnecting MemberPress to Google Ads
- MemberPress → MetaConnecting MemberPress to Meta Conversions API
- MemberPress → GA4Connecting MemberPress to GA4
RELATED GUIDES
Where MemberPress → Segment fits in the rest of your tracking
- Podia → SegmentConnecting Podia to Segment
- Patreon → SegmentConnecting Patreon to Segment
- ClickFunnels → SegmentConnecting ClickFunnels to Segment
- MemberPress → BigQueryConnecting MemberPress to BigQuery
- Course creatorsConversion tracking for course creators, including the payments after the first one
- Circle → SegmentConnecting Circle to Segment
- SamCart → SegmentConnecting SamCart to Segment
- Kajabi → SegmentConnecting Kajabi to Segment
Free · 30 min
Get MemberPress and Segment joined properly
Free30 minutesNo obligation
