Churn rate is the percentage of users who stop using your product during a specific time period. In Mixpanel, you measure churn through retention analysis—tracking which user cohorts keep coming back and which ones disappear. It's the inverse of retention: if 70% of users stay active, your churn rate is 30%.
Understanding Churn in Mixpanel
Mixpanel's Retention report is built to measure exactly this. It shows cohorts of users and tracks whether they return in subsequent periods.
Track Core User Activity Events
Churn measurement starts with event tracking. Use mixpanel.track() to log key actions like Sign In, View Dashboard, or Save Analysis. The more consistently you track, the more accurate your churn picture becomes.
// Track sign-in as your primary activity indicator
mixpanel.track('Sign In', {
'User ID': user.id,
'Plan Type': user.subscription_tier,
'Days Since Signup': Math.floor((Date.now() - user.created_at) / 86400000)
});
// Track secondary engagement actions
mixpanel.track('Save Analysis', {
'Analysis Type': 'Cohort',
'Total Analyses': user.analysis_count
});Set User Properties to Segment Churn
Add user properties with mixpanel.people.set() so you can compare churn across user segments. Track Plan, Signup Date, Onboarded, or Feature Usage to understand which groups churn first.
// Set properties for later segmentation in retention reports
mixpanel.people.set({
'Plan': 'Pro',
'Company Size': '10-100',
'Industry': 'SaaS',
'Completed Onboarding': true,
'Signup Date': new Date().toISOString()
});
// Now filter retention report by Plan == 'Pro' to see if Pro users churn lessMeasuring Churn with Retention Reports
Open Retention in Mixpanel's left sidebar to see churn data by cohort. It shows the percentage of users from each cohort who return in subsequent time periods.
Set Up Your Retention Report
Select born event (like 'Sign Up') to define your cohort. Select returning event (like 'Sign In') to measure if users stay active. Mixpanel returns retention percentages. Churn = 100% - retention.
// Example: Reading retention data from Mixpanel's Data Export API
const retentionQuery = {
'from_date': '2025-02-01',
'to_date': '2025-03-26',
'retention_type': 'event',
'born_event': 'Sign Up',
'event': 'Sign In',
'interval': 'week',
'interval_count': 8
};
// Response shows retention % per week
const result = {
'cohort_2025_02_01': [100, 68, 54, 42, 35, 30, 28, 26]
};
// Week 4 retention is 35%, so week 4 churn = 65%
const churnWeek4 = 100 - 35;Compare Churn Across Segments
Use the filter bar in Retention to compare churn by user segment. Filter by Plan, Company Size, Industry, or any user property to see which groups churn fastest. This reveals retention patterns tied to user characteristics.
// Add properties to events for easy filtering in retention reports
mixpanel.track('View Dashboard', {
'Plan': user.plan, // Filter: Plan == 'Pro' vs 'Free'
'Onboarded': true, // Filter: Completed onboarding yes/no
'Days Active': user.days_active,
'Feature Count': user.feature_usage_count
});
// In Retention UI, apply filter: Plan == 'Pro'
// Then apply filter: Plan == 'Free'
// Compare side-by-side to see if paid users churn lessCommon Pitfalls
- Tracking too many events or using inconsistent naming. 'Sign In' and 'User Login' are two different events to Mixpanel. Define event names upfront and stick to them.
- Confusing retention cohorts. A cohort is everyone who did the born event on the same day. Don't mix cohorts from different date ranges.
- Ignoring reactivations. Mixpanel's retention counts users as 'returned' if they appear even once. If you need to track 'inactive for 30 days', calculate that separately.
- Not splitting churn by user type. Free users often churn 5-10x faster than paid users. Always compare retention curves across segments.
Wrapping Up
Churn rate in Mixpanel is straightforward: it's 100% minus your retention percentage, calculated by cohort and time period. By tracking events consistently, setting user properties, and comparing cohorts across segments, you can spot which users drop off and when. If you want to track this automatically across tools, Product Analyst can help.