Connecting Rebuy to PostHog
Rebuy adds personalised upsells across the cart, checkout and post-purchase, which means the order value at checkout is frequently not the order value that settles. 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 Rebuy-influenced order 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
Rebuy in PostHog: upsell acceptance as events on the same person
PostHog can study Rebuy itself: widget impressions, clicks, adds and post-purchase accepts as events on the visit's distinct_id. Write the distinct_id into cart attributes, then send one order event from Shopify order data through the capture API, with a stable UUID, settled total and upsell amount as properties. Check ingestion lag on peak sale days.
PostHog is the destination in this list where you can study Rebuy itself rather than only report its revenue. Widget impressions, recommendation clicks, adds from a Rebuy widget and the post-purchase accept or decline can all be events on the same distinct_id as the visit, so a funnel can show where upsells win and where they cost you a checkout.
The constraint is Shopify's checkout. Rebuy's cart widgets run on your storefront, where the PostHog snippet works normally, but checkout and the post-purchase page run in Shopify's own environment, where a storefront snippet does not. Write the distinct_id into cart attributes during the session, then send the order and any accepted post-purchase offer from the Shopify order data through the capture API, with that distinct_id and a stable UUID per order. Use one order event carrying the settled total and the upsell amount as properties, rather than two purchase events.
If you self-host PostHog to keep customer data on your own infrastructure, peak sale days are the test. Rebuy-heavy storefronts fire many widget events per session, and ingestion lag on those days is the likeliest cause of a gap between PostHog and Shopify. Check the lag before assuming the integration broke.
Rebuy → PostHog · what breaks
Why this join usually fails — Rebuy → PostHog
- 01
The distinct_id never reaches Rebuy
Post-purchase offers render after the order is created, so a conversion fired at checkout has already gone before the upsell revenue exists.
- 02
Upsell revenue missing from every conversion
Post-purchase upsells can add a meaningful percentage to average order value. Firing the conversion at checkout means none of it is attributed, and the campaigns that bring upsell-receptive buyers look identical to those that do not.
- 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.
Rebuy → PostHog · the fix
What working looks like — Rebuy → PostHog
The distinct_id on every order
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Rebuy → PostHog · architecture
How Rebuy and PostHog actually connect
- 1
Rebuy holds the truth
A post-purchase upsell creates additional revenue on the same order, seconds to minutes after the original conversion fired. If the conversion was sent at checkout, that revenue is missing from every report.
- 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 Rebuy-influenced order.
- 4
The event source decides reliability
Send the settled order total including accepted upsells, with the upsell contribution recorded separately.
- 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.
Rebuy → PostHog · normal or broken
Working vs. broken, side by side — Rebuy → PostHog
Normal, not a fault
The distinct_id present on the order
Sent from the Shopify order webhook, after post-purchase
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
Post-purchase offers render after the order is created, so a conversion fired at checkout has already gone before the upsell revenue exists.
Sent from the browser
Post-purchase upsells can add a meaningful percentage to average order value. Firing the conversion at checkout means none of it is attributed, and the campaigns that bring upsell-receptive buyers look identical to those that do not.
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
Rebuy → PostHog · diagnose
Diagnostic order — Rebuy → PostHog
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare checkout-time order value against final settled order value
The gap is your upsell revenue, and it is the amount your conversion reporting is currently discarding.
- 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.
Rebuy → PostHog · prove
How it gets proven — Rebuy → PostHog
Source of truth
The final Shopify order total after any post-purchase upsell has been accepted.
- The distinct_id confirmed present on a live order.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Settled order totals reconciled against imported conversions, with upsell contribution stated separately.
Rebuy → PostHog · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Compare checkout-time order value against final settled order value
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
The final Shopify order total after any post-purchase upsell has been accepted.
Free30 minutesNo obligation
Rebuy → PostHog · when not to buy
When you don't need this — Rebuy → PostHog
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- If you run no post-purchase offers, checkout-time value is the final value and the timing question does not arise.
- 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.
Rebuy → PostHog · what we deliver
What gets built — Rebuy → PostHog
Identifier capture into Rebuy
Send the conversion from the order webhook after the post-purchase window closes, or send an adjustment when the upsell is accepted.
Event source: the Shopify order webhook, after post-purchase
Send the settled order total including accepted upsells, with the upsell contribution recorded separately.
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
Refunds reverse, including refunded upsells specifically.
Written guarantee
95%+ tracking accuracy
Measured against The final Shopify order total after any post-purchase upsell has been accepted.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Rebuy → PostHog questions, answered
Send it server-side from the Shopify order data after the post-purchase window, using the distinct_id you stored in cart attributes. The post-purchase page does not run your storefront PostHog snippet.
Named events. Autocapture on dynamically rendered widgets records selectors that change when the widget markup changes; a named event with widget and product properties stays comparable over time.
Almost always because the distinct_id never reached the Rebuy-influenced order. Post-purchase offers render after the order is created, so a conversion fired at checkout has already gone before the upsell revenue exists. 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 Shopify order webhook, after post-purchase. Send the settled order total including accepted upsells, with the upsell contribution recorded separately.
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 Rebuy → PostHog
- Stripe → PostHogConnecting Stripe to PostHog
- PayPal → PostHogConnecting PayPal to PostHog
- Shopify → PostHogConnecting Shopify to PostHog
RELATED GUIDES
Where Rebuy → PostHog fits in the rest of your tracking
- AfterSell → PostHogConnecting AfterSell to PostHog
- CartHook → PostHogConnecting CartHook to PostHog
- Checkout Champ → PostHogConnecting Checkout Champ to PostHog
- Rebuy → AmplitudeConnecting Rebuy to Amplitude
- Rebuy → GA4Connecting Rebuy to GA4
- BeautyConversion tracking for beauty brands, including the second order
- Zipify OCU → PostHogConnecting Zipify OneClickUpsell to PostHog
Free · 30 min
Get Rebuy and PostHog joined properly
Free30 minutesNo obligation
