Retention rate tells you what percentage of users come back. It's the difference between a product people use once and abandon, versus one they keep using. PostHog measures retention by grouping users into cohorts—bucketing them by when they first did something—then tracking who does it again.
Understanding Retention Rate
Retention answers a simple question: of the users who started with you on Day 0, how many are still around on Day 7, Day 30, or Day 90?
Know what retention actually measures
Retention rate is the percentage of users who performed a target action on Day 0, then performed the same (or similar) action again on a future day. If 100 users signed up on Monday and 40 came back on Friday, your Day 4 retention is 40%. PostHog's Retention insight automates this cohort bucketing for you.
// Track user actions that define retention
posthog.capture('user_signup', {
properties: {
plan: 'free',
signup_source: 'organic',
},
});
// Later, track what counts as a return
posthog.capture('user_engaged', {
properties: {
feature_used: 'dashboard',
},
});Understand cohorts in the context of retention
A cohort is a group of users bucketed by when they first took an action. PostHog's Retention insight groups users by their "starting event" (like signup), then measures how many do a "returning event" (like login or feature use) in subsequent time periods.
// Use distinct_id consistently so PostHog tracks the same user
posthog.capture('user_signup', {
distinct_id: '[email protected]',
properties: {
user_id: '12345',
},
});
// Subsequent actions from the same distinct_id
posthog.capture('feature_accessed', {
distinct_id: '[email protected]',
properties: {
feature: 'analytics',
},
});Measuring Retention in PostHog
PostHog has a dedicated Retention insight that calculates cohorts for you without needing SQL.
Open the Retention insight
In PostHog, go to Insights and click + New insight. Select Retention from the chart types. This opens the retention builder where you configure your starting and returning events.
// Send events before PostHog can analyze retention
posthog.capture('product_onboarded', {
properties: {
plan_type: 'premium',
onboarding_completed: true,
},
});
posthog.capture('report_created', {
properties: {
report_type: 'custom',
},
});Configure your starting and return events
Choose your Starting action (the event that defines Day 0, usually signup or first login) and your Returning action (what counts as a return). PostHog calculates which users did the starting event in each time period, then counts how many did the returning action afterward.
// Starting event: first-time user signup
posthog.capture('user_signup', {
properties: {
signup_date: new Date(),
},
});
// Returning event: user logs back in
posthog.capture('user_login', {
properties: {
login_date: new Date(),
},
});Read your retention table
The retention table shows days across the top (Day 0, 1, 2, 7, 30) and cohorts down the left (users who started on Week 1, Week 2, etc.). Each cell shows the percentage of that cohort who returned. Green cells indicate higher retention; red indicates lower. A healthy product has Day 1 retention >30% and Day 30 retention >15%.
// Segment retention by user properties for deeper insight
posthog.capture('user_login', {
properties: {
plan_tier: 'premium',
region: 'us-west',
company_size: 'enterprise',
},
});
// In PostHog, use filters to compare retention by plan_tier or regionInterpreting Retention Curves
Different retention shapes tell different stories. Here's what to look for.
Spot a healthy retention curve
Healthy retention drops sharply from Day 0 to Day 1, then flattens. You lose unengaged users fast, but the ones who stick around keep coming back. A curve that drops 50% by Day 1, then holds steady at 20–30% from Day 7 onward, is typical and healthy for SaaS.
// Export retention data via PostHog's REST API for analysis
fetch('https://app.posthog.com/api/projects/{project_id}/insights/', {
method: 'GET',
headers: {
'Authorization': `Bearer ${POSTHOG_PERSONAL_API_KEY}`,
'Content-Type': 'application/json',
},
})
.then(res => res.json())
.then(data => {
const retention = data.results.find(i => i.filters.insight === 'RETENTION');
console.log(retention);
});Recognize a retention problem
If Day 1 retention is <10%, your product isn't sticky. Users try it and leave immediately. This signals onboarding friction or unclear value proposition. If retention stays flat (95% on Day 1, 7, and 30), you're probably measuring the wrong events or your starting event captures too many unengaged users.
// Improve retention by tracking value-delivering actions
posthog.capture('user_login', {
properties: {
is_returning: true,
},
});
// Track deeper engagement, not just logins
posthog.capture('report_viewed', {
properties: {
report_type: 'roi_analysis',
time_to_value: 180,
},
});
posthog.capture('insight_created', {
properties: {
insight_type: 'custom_metric',
},
});Common Pitfalls
- Using the same event for starting and returning actions. If both are signup, you're measuring re-signup (rare), not retention. Use signup as starting event, login or feature use as returning event.
- Not filtering or segmenting by user properties. Free users and paying users have different retention curves. Always compare retention across plan tier, region, or acquisition source.
- Ignoring time zone mismatches. PostHog uses UTC by default for cohort bucketing. If Day 1 retention looks wrong, check if your user's local Day 1 aligns with PostHog's UTC Day 1.
- Defining return events too narrowly. If return event = 'viewed analytics,' but only 5% of users view analytics, you'll see artificially low retention. Use events that reflect general product engagement.
Wrapping Up
Retention rate is the percentage of users who come back after their first action. PostHog's Retention insight groups users into cohorts and tracks who returns across days, weeks, and months. A healthy product has a curve that drops fast early, then plateaus—that's the core of stickiness. If you want to track retention automatically across tools and benchmark against industry standards, Product Analyst can help.