Retain identifies people by email. Make sure your PostHog setup stores an
email property on person profiles (most posthog.identify() calls already
do this). Events from anonymous visitors are skipped.How it works
PostHog sends each event to Retain as it happens. Retain then:- Turns
$identifyand$setevents into customer profiles (email, name, and other traits) - Records your custom events (e.g.
report exported) as Retain events, auto-creating them on first sight - Maps group analytics (
$groupidentify,$groups) to Retain accounts, so B2B usage rolls up correctly - Ignores PostHog-internal events like
$pageview,$autocapture, and$feature_flag_called - Deduplicates retries, so a redelivered event never counts twice
Report Exported becomes report_exported.
Set it up
1
Copy your Retain write key
In Retain, go to Settings → Project token and copy your write key (it
starts with
rk-).2
Create the destination in PostHog
In PostHog, open Data → Destinations → New destination, search for
Retain and select it.
3
Paste your write key
Paste the write key into the Retain write key field. That’s the whole
configuration.
4
Filter to the events that matter
In the destination’s Filters, select your key product events plus
$identify. Two reasons: Retain’s churn detection works best on
high-signal events, and PostHog bills realtime destinations per trigger
event (the first 10k per month are free), so filtering keeps you in the
free tier.5
Test and enable
Use PostHog’s Start testing button to fire a test event, then enable
the destination. Events show up in Retain under
Events, and identified users
under Customers.
Configure your events
Once events arrive, set their Importance and Expected frequency on the Events page so Retain knows what healthy usage looks like. See Track events for what each setting does.Troubleshooting
- Events aren’t showing up. Check the destination’s logs in PostHog. A
401means the write key is wrong — copy it again from Settings → Project token in Retain. - Events arrive but no customer is created. The person has no valid
emailin their PostHog person properties. Retain skips events it can’t tie to an email. - An event appears with a different name. That’s the snake_case normalization.
Signed Upin PostHog issigned_upin Retain. $pageviewnever arrives. By design — PostHog-internal$events are ignored. Track a meaningful custom event instead.