5 min read

How to Monitor Retention Rate in PostHog

Retention is the metric that matters most—if users don't come back, nothing else matters. PostHog's retention insight shows you exactly which users stick around and which cohorts are dropping off. You'll need clean event tracking and the right analysis setup to get actionable numbers.

Set Up Event Tracking for Retention

Retention analysis needs two events: a starting event (like sign-up) and an action event (like feature usage). Without clean events, you'll get noise.

Track Your Starting Event

Decide what defines a user entering your cohort. This is usually sign-up, account created, or first login. Capture this event when the user first engages. Use posthog.capture() with a clear event name.

javascript
// Capture sign-up event
posthog.capture('signed_up', {
  plan: 'free',
  source: 'organic',
  timestamp: new Date().toISOString()
});
Send a starting event when the user first joins

Track Recurring Action Events

The second piece is an action event—something users do repeatedly (or should do). This might be viewed_dashboard, ran_query, or used_feature. Capture this every time a user takes the action you care about tracking.

javascript
// Capture an action event
posthog.capture('ran_query', {
  query_type: 'sql',
  duration_ms: 245,
  result_count: 1500
});
Send action events as users engage with your product

Set User Properties for Filtering

You can't measure retention for all users—you need to filter by properties. Use posthog.identify() to set user properties like plan, country, or feature access. PostHog will let you filter retention by these properties later.

javascript
// Identify user and set properties
posthog.identify('user_123', {
  email: '[email protected]',
  plan: 'pro',
  company: 'Acme',
  created_at: '2025-06-01'
});
Identify users and set properties to enable filtering in retention analysis
Watch out: Use the same event name consistently. If you call it signed_up once and signup elsewhere, PostHog treats them as different events and your cohort will be fragmented.

Create a Retention Insight

Once events are flowing, build a retention analysis. PostHog's retention insight calculates the percentage of users from your starting cohort who perform your action event on subsequent periods.

Open the Retention Insight

In PostHog, go to Insights and select Retention. You'll see options to set your starting event, action event, and retention period (daily, weekly, or monthly).

Select Your Starting and Action Events

Under the retention configuration, choose your starting event (e.g., signed_up) and action event (e.g., ran_query). PostHog calculates the % of users who performed the action event on day 1, day 2, week 2, etc.

Choose Your Retention Period

Select whether you want to measure daily, weekly, or monthly retention. Daily is good for high-frequency products (web apps); weekly or monthly is better for lower-frequency tools (analytics platforms, enterprise software).

Filter Your Retention Cohort

Filter the starting cohort by properties. For example, filter to plan = 'pro' to see only paid users' retention, or filter by country = 'US' to segment geographically. This isolates retention for the segments that matter most.

javascript
// Track plan changes so you can filter retention by plan
posthog.identify('user_456', {
  plan: 'pro',
  signup_date: '2025-01-15',
  upgrade_date: '2025-03-01'
});

// Later, in PostHog UI, filter retention where plan = 'pro'
Set properties on users so you can filter retention cohorts in PostHog UI
Tip: If retention looks too good to be true (90%+ for weeks), check your action event. You might be picking something every user does (like a pageview) rather than a meaningful engagement action.

Monitor Retention on Dashboards

One-off retention checks aren't enough. Add retention insights to a dashboard you check regularly so you spot trends early and catch declines before they become problems.

Add Retention to a Dashboard

In your retention insight, click Add to dashboard. Create a new dashboard or add to an existing one. Name it something actionable like Weekly Retention – Free vs Pro or Cohort Retention by Region.

Set Up Regular Reviews

Check the dashboard weekly (for daily retention) or monthly (for weekly/monthly retention). Look for drops—a 5% week-over-week decline is a red flag. Investigate what changed: a bad release? New friction? A UI change?

Compare Segments Side-by-Side

Create separate retention insights for users who completed onboarding vs. those who didn't, or for users who activated a key feature vs. those who haven't. This tells you whether friction in your product is hurting retention.

javascript
// Track onboarding completion
posthog.capture('onboarding_completed', {
  steps_completed: 5,
  time_to_onboard_minutes: 12
});

// Mark the user as onboarded
posthog.identify('user_789', {
  onboarding_status: 'completed',
  onboarding_date: '2025-03-10'
});
Use events and properties to segment retention by user actions
Tip: Compare paid vs. free cohorts. If pro users have 15% better retention, that validates your paid product. If they're the same, ask why—you might have feature or pricing problems.

Common Pitfalls

  • Picking an action event that's too common (e.g., pageview) will show artificially high retention. You want to measure *meaningful* engagement, not just traffic.
  • Forgetting to set user properties early. If you don't identify users and set properties like plan or signup date, you won't be able to filter or segment retention cohorts later.
  • Mixing up calendar weeks vs. days since signup. PostHog's retention is measured from the starting event, not the calendar. Day 7 means 7 days after sign-up, not 'next Monday'.
  • Ignoring seasonal drops or external changes. If retention dips after a release, check your changelog. Changes in retention often correlate with product or marketing changes.

Wrapping Up

You now have retention insights running in PostHog and on your dashboard. Watch for cohort trends, segment by plan or feature, and act on declines early. Retention is your north star metric—if you're losing users, everything else is secondary. If you want to track retention automatically across tools and surface anomalies without manual checking, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free