Connecting Resend to PostHog
Resend is modern developer email where templates live in your codebase, which makes sends easy to ship and equally easy to ship without anyone measuring them. 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 Resend message 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
Resend sends as PostHog events on the same distinct_id
PostHog suits Resend data. Attach your user ID as a Resend tag, capture delivered, bounced and clicked webhooks server-side under that distinct_id with template version and send tag, and derive each event's UUID from the Resend email ID plus event type to deduplicate retries. Run copy tests as feature flags evaluated at send time. Leave opens out of metrics.
Unlike most destinations here, PostHog is a sensible place for Resend data. Product analytics is where you want to ask whether people who received the trial-ending email upgraded more often than those who did not, and that needs the send recorded against the same distinct_id as the product events. Attach your user ID as a Resend tag, receive the delivered, bounced and clicked webhooks, and capture them in PostHog server-side with that ID.
Set the template version and send tag as event properties, which lets you build a funnel from email delivered to the next product action, broken down by version. Resend retries webhooks, so give each captured event a UUID derived from the Resend email ID and the event type; PostHog deduplicates on it, and without it a retried batch doubles your send counts.
If you test email copy, run the split as a PostHog feature flag evaluated when the email is sent, and pass the variant into the Resend tags. The experiment's conversion then measures the variant the person actually received. Leave opens out of any metric; Apple Mail Privacy Protection fires them automatically, and in PostHog they will look like engagement.
Resend → PostHog · what breaks
Why this join usually fails — Resend → PostHog
- 01
The distinct_id never reaches Resend
No session, and the send is triggered by application logic that changes on the normal deploy cadence.
- 02
Email changes shipping invisibly with deploys
When templates are code, they change without a campaign calendar entry. A conversion rate shift gets attributed to media, creative or seasonality, and the actual cause was a reworded subject line in last Tuesday's release.
- 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.
Resend → PostHog · the fix
What working looks like — Resend → PostHog
The distinct_id on every message
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Resend → PostHog · architecture
How Resend and PostHog actually connect
- 1
Resend holds the truth
Templates in code means email changes ride along with deploys. A revenue change the week of a release may be the email, and nothing in the marketing stack will show that.
- 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 Resend message.
- 4
The event source decides reliability
Send orders, with the email template version attached where a send preceded the purchase.
- 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.
Resend → PostHog · normal or broken
Working vs. broken, side by side — Resend → PostHog
Normal, not a fault
The distinct_id present on the message
Sent from your order system
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
No session, and the send is triggered by application logic that changes on the normal deploy cadence.
Sent from the browser
When templates are code, they change without a campaign calendar entry. A conversion rate shift gets attributed to media, creative or seasonality, and the actual cause was a reworded subject line in last Tuesday's release.
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
Resend → PostHog · diagnose
Diagnostic order — Resend → PostHog
- 01
Count messages carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Check the deploy log before diagnosing an unexplained conversion change
Cheap to check and it explains a genuine share of otherwise mysterious movements.
- 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.
Resend → PostHog · prove
How it gets proven — Resend → PostHog
Source of truth
Your order or application record, joined to the send.
- The distinct_id confirmed present on a live message.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Orders reconciled against imported conversions, with template versions recorded in the timeline.
Resend → PostHog · free audit
What we check in the free audit
- Count messages carrying the distinct_id
- Follow one real conversion end to end
- Check the deploy log before diagnosing an unexplained conversion change
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Your order or application record, joined to the send.
Free30 minutesNo obligation
Resend → PostHog · when not to buy
When you don't need this — Resend → PostHog
- Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the distinct_id.
- If your emails rarely change, the versioning discipline costs more than it returns.
- 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.
Resend → PostHog · what we deliver
What gets built — Resend → PostHog
Identifier capture into Resend
Record the template version on the message so an email change is visible in the timeline alongside campaign changes.
Event source: your order system
Send orders, with the email template version attached where a send preceded the purchase.
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.
Written guarantee
95%+ tracking accuracy
Measured against Your order or application record, joined to the send.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Resend → PostHog questions, answered
Tag each send with your user ID, receive Resend webhooks on your server, and capture them in PostHog with that ID as distinct_id and the template version as a property.
Webhooks are retried. Give each event a UUID built from the Resend email ID and event type so PostHog deduplicates it.
Almost always because the distinct_id never reached the Resend message. No session, and the send is triggered by application logic that changes on the normal deploy cadence. 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.
Your order system. Send orders, with the email template version attached where a send preceded the purchase.
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 Resend → PostHog
- Stripe → PostHogConnecting Stripe to PostHog
- PayPal → PostHogConnecting PayPal to PostHog
- Shopify → PostHogConnecting Shopify to PostHog
RELATED GUIDES
Where Resend → PostHog fits in the rest of your tracking
- SendGrid → PostHogConnecting SendGrid to PostHog
- Mailgun → PostHogConnecting Mailgun to PostHog
- Postmark → PostHogConnecting Postmark to PostHog
- Resend → AmplitudeConnecting Resend to Amplitude
- Resend → MixpanelConnecting Resend to Mixpanel
- EcommerceConversion tracking for ecommerce brands, measured against your orders
Free · 30 min
Get Resend and PostHog joined properly
Free30 minutesNo obligation
