Connecting PayPal to PostHog
PayPal holds the settled transaction, and it is frequently the payment method that reports worst. 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 PayPal transaction 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
PayPal checkouts in PostHog: the funnel step you cannot see
In PostHog, PayPal looks like a funnel cliff because non-returners never load the confirmation page. Capture an order-completed event from your backend on PAYMENT.CAPTURE.COMPLETED with the distinct_id stored on the order before hand-off, using an order-derived UUID. Break funnels down by payment method, and add PayPal fee and refund events.
In a PostHog funnel, PayPal shows up as a cliff. Users click the PayPal button, a popup or redirect to paypal.com opens, and the next step in the funnel, the confirmation page view, only happens for buyers who come back. Session replay cannot help either, because the PayPal window is a different origin and records as blank. Without a server event, PayPal looks like your worst checkout step when it is often fine.
Fix it by capturing an order-completed event from your backend when PAYMENT.CAPTURE.COMPLETED arrives, with the distinct_id of the person who started checkout. Store that distinct_id on the order before the PayPal hand-off, or pass your user ID through custom_id for identified users. Give the event a stable UUID derived from the order so a retried webhook does not create a second purchase.
Then compare paths. Build the funnel on the server event, break it down by payment method, and you can see whether PayPal really converts worse than cards or just reported worse. Add the PayPal fee and refund status as event properties, and send a refund event so revenue insights reflect what you kept.
PayPal → PostHog · what breaks
Why this join usually fails — PayPal → PostHog
- 01
The distinct_id never reaches PayPal
The classic PayPal flow bounces the buyer to paypal.com and back. If the buyer abandons the return, your site never runs the thank-you page and never fires anything, but PayPal has already taken the money. This is why PayPal-heavy stores routinely under-report: the sale is real and the tracking event does not exist.
- 02
The buyer never comes back from PayPal
Money moves, the confirmation page never loads, and the conversion is invisible. It is the single biggest reason PayPal-heavy stores see paid channels look worse than they are.
- 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.
PayPal → PostHog · the fix
What working looks like — PayPal → PostHog
The distinct_id on every transaction
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
PayPal → PostHog · architecture
How PayPal and PostHog actually connect
- 1
PayPal holds the truth
The transaction record carries the amount, currency and a transaction ID. It is also the record that survives when the buyer is redirected out to PayPal and never returns to your confirmation page.
- 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 PayPal transaction.
- 4
The event source decides reliability
Listen for PAYMENT.CAPTURE.COMPLETED and send from your server. Firing on the return URL loses every buyer who closes the tab at PayPal, which is a much larger share than most merchants expect.
- 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.
PayPal → PostHog · normal or broken
Working vs. broken, side by side — PayPal → PostHog
Normal, not a fault
The distinct_id present on the transaction
Sent from the PayPal webhook (or your order record when the IPN lands)
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
The classic PayPal flow bounces the buyer to paypal.com and back. If the buyer abandons the return, your site never runs the thank-you page and never fires anything, but PayPal has already taken the money. This is why PayPal-heavy stores routinely under-report: the sale is real and the tracking event does not exist.
Sent from the browser
Money moves, the confirmation page never loads, and the conversion is invisible. It is the single biggest reason PayPal-heavy stores see paid channels look worse than they are.
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
PayPal → PostHog · diagnose
Diagnostic order — PayPal → PostHog
- 01
Count transactions carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare completed PayPal transactions against confirmation-page loads
For the same day. The gap between the two is the share of PayPal revenue your browser-side setup is structurally unable to see.
- 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.
PayPal → PostHog · prove
How it gets proven — PayPal → PostHog
Source of truth
PayPal's Activity report, filtered to completed payments for the same window.
- The distinct_id confirmed present on a live transaction.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- A PayPal order where the buyer never returned to the site, confirmed to have reported anyway.
PayPal → PostHog · free audit
What we check in the free audit
- Count transactions carrying the distinct_id
- Follow one real conversion end to end
- Compare completed PayPal transactions against confirmation-page loads
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
PayPal's Activity report, filtered to completed payments for the same window.
Free30 minutesNo obligation
PayPal → PostHog · when not to buy
When you don't need this — PayPal → PostHog
- Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the distinct_id.
- If PayPal is under a few percent of your orders, fixing the whole flow may not move a decision. Measure the share first.
- 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.
PayPal → PostHog · what we deliver
What gets built — PayPal → PostHog
Identifier capture into PayPal
Capture the click identifier before checkout and store it against the order in your own database, keyed by the PayPal order ID. PayPal's own custom_id / invoice_id fields can carry your order reference so the two records can always be re-joined server-side.
Event source: the PayPal webhook (or your order record when the IPN lands)
Listen for PAYMENT.CAPTURE.COMPLETED and send from your server. Firing on the return URL loses every buyer who closes the tab at PayPal, which is a much larger share than most merchants expect.
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
PAYMENT.CAPTURE.REFUNDED and the dispute webhooks exist and carry the same reference, so reversals can be wired properly.
Written guarantee
95%+ tracking accuracy
Measured against PayPal's Activity report, filtered to completed payments for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
PayPal → PostHog questions, answered
Because buyers who pay and do not return never trigger the confirmation pageview. Use a server-side order event from the PayPal webhook as the funnel's last step.
No. The PayPal window is a separate origin, so replay cannot see inside it.
Almost always because the distinct_id never reached the PayPal transaction. The classic PayPal flow bounces the buyer to paypal.com and back. If the buyer abandons the return, your site never runs the thank-you page and never fires anything, but PayPal has already taken the money. This is why PayPal-heavy stores routinely under-report: the sale is real and the tracking event does not exist. 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 PayPal webhook (or your order record when the IPN lands). Listen for PAYMENT.CAPTURE.COMPLETED and send from your server. Firing on the return URL loses every buyer who closes the tab at PayPal, which is a much larger share than most merchants expect.
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 PayPal → PostHog
- PayPal → GA4Connecting PayPal to GA4
- PayPal → Google AdsConnecting PayPal to Google Ads
- PayPal → MetaConnecting PayPal to Meta Conversions API
Using PayPal for bookings? How PayPal bookings get tracked end to end
RELATED GUIDES
Where PayPal → PostHog fits in the rest of your tracking
- Stripe → PostHogConnecting Stripe to PostHog
- Stripe Billing → PostHogConnecting Stripe Billing to PostHog
- PayPal → MatomoConnecting PayPal to Matomo
- PayPal → GA4Connecting PayPal to GA4
- EcommerceConversion tracking for ecommerce brands, measured against your orders
- Stripe Billing → MixpanelConnecting Stripe Billing to Mixpanel
- Stripe Billing → AmplitudeConnecting Stripe Billing to Amplitude
- Stripe Billing → GA4Connecting Stripe Billing to GA4
Free · 30 min
Get PayPal and PostHog joined properly
Free30 minutesNo obligation
