6 min read

How to Monitor Churn Rate in Mixpanel

Churn is the silent killer of growth. If you're not watching it in Mixpanel, you're flying blind. We'll show you how to instrument churn tracking, analyze retention cohorts, and set up alerts so you catch at-risk users before they leave.

Track Churn Events in Mixpanel

Start by instrumenting churn events directly in your app. When a user cancels, downgrades, or goes inactive, that's data you need to capture.

Step 1: Track subscription cancellations

Fire a Subscription Canceled event whenever a user cancels their subscription. Include properties like subscription_plan, account_tenure_days, and mrr so you can segment churners by cohort.

javascript
mixpanel.track('Subscription Canceled', {
  'subscription_plan': 'pro',
  'account_tenure_days': 180,
  'mrr': 99,
  'cancellation_reason': 'too_expensive',
  'timestamp': new Date().toISOString()
});
Fire this when a subscription cancels. Include context about the account.

Step 2: Track account inactivity as churn

Not all churn is explicit. Users who go inactive are churned. Track a User Inactive event after 30 days without action. Use mixpanel.people.set() to flag inactive users in their profile.

javascript
mixpanel.track('User Inactive', {
  'days_inactive': 30,
  'last_action': 'dashboard_view'
});

mixpanel.people.set({
  'is_inactive': true,
  'inactive_since': new Date().toISOString()
});
Track inactivity and update the user profile so you can build segments.

Step 3: Capture churn context in user profiles

Always attach context to understand why churn happened. Set user properties like lifetime_value, support_tickets_opened, or feature_adoption_score so you can correlate behavior with retention.

javascript
mixpanel.people.set({
  'lifetime_value': 1200,
  'feature_adoption_score': 0.3,
  'support_tickets': 5,
  'days_since_signup': 120,
  'last_login': new Date().toISOString()
});
Set user properties at signup and after key actions so you have rich context when analyzing churn.
Tip: Track churn events the moment the action happens (subscription canceled, account deletion confirmed). Don't wait for async jobs or webhooks—capture it immediately in the UI layer.

Analyze Churn with Retention Reports

Now that you're tracking churn, use Mixpanel's retention reports to see which cohorts are actually leaving.

Step 1: Build a retention report by signup cohort

Go to Retention in the left nav, set your retention event to a non-churn action like Feature Used or Report Created, and bucket by First Use Date. This shows week-over-week how many users from each signup cohort stayed active.

javascript
// Track actions that indicate continued engagement
mixpanel.track('Feature Used', {
  'feature': 'dashboard_analysis',
  'timestamp': new Date().toISOString()
});

// In Mixpanel UI: Retention → Event: 'Feature Used' → Cohort by: 'First Use Date'

Step 2: Create a cohort of at-risk users

Go to Cohorts and build a segment of users who haven't taken an action in 7 days. Use filters like last_login < 7 days ago or feature_usage_count = 0 in last 7 days. This is your early warning system.

javascript
const atRiskUsers = await fetch(
  'https://api.mixpanel.com/engage?' +
  'where=' + encodeURIComponent(JSON.stringify({"$and":[{"properties":{"$days_since_last_login":{"$gte":7}}}]})) +
  '&access_token=YOUR_TOKEN'
).then(r => r.json());

console.log(`Found ${atRiskUsers.results.length} at-risk users`);
Use the Engage API to find inactive users. Export this list to re-engage or analyze.

Step 3: Segment churners by reason

In Segmentation, break down Subscription Canceled events by cancellation_reason. This shows if people are leaving because pricing is too high, they don't use features, or they had support issues.

javascript
mixpanel.track('Subscription Canceled', {
  'reason': 'feature_request_denied',
  'plan': 'professional',
  'monthly_spend': 299,
  'account_age_months': 12
});

// In Mixpanel: Segmentation → Event: 'Subscription Canceled' → Segment by: 'reason'
Watch out: Don't conflate "activity" with "retention." A user who logs in but never uses features is different from a user gone dark. Track specific actions, not just login.

Monitor and Alert on Churn Trends

Set up dashboards and alerts so churn doesn't sneak up on you.

Step 1: Create a churn rate dashboard

Build a dashboard with cards showing: weekly churn rate (Subscription Canceled events / total users), retention curves by cohort, and churn breakdown by plan. Refresh daily.

javascript
const calculateChurnRate = (canceledCount, totalUsers) => {
  return ((canceledCount / totalUsers) * 100).toFixed(2);
};

mixpanel.track('Churn Rate Snapshot', {
  'churn_rate_percent': calculateChurnRate(45, 1200),
  'period': 'week',
  'date': new Date().toISOString()
});
Log churn metrics to track over time.

Step 2: Set up alerts for churn spikes

Use Alerts in Mixpanel or integrate via Zapier to notify your team when churn rate spikes week-over-week or when a cohort's retention drops below your threshold (e.g., > 5% weekly churn).

javascript
// Check churn daily
const checkChurnThreshold = async () => {
  const weeklyChurned = await queryMixpanel('Subscription Canceled', {period: 'week'});
  const totalUsers = await queryMixpanel('user_count', {});
  const churnRate = (weeklyChurned / totalUsers) * 100;
  
  if (churnRate > 5) {
    console.warn(`Alert: Churn spike detected at ${churnRate}%`);
  }
};
Monitor churn continuously and alert when it exceeds your baseline.

Step 3: Correlate churn with feature usage

Compare feature adoption of churned vs. retained users. If churners rarely visited Reports, that's a feature adoption problem. Track feature touches alongside churn to identify the pattern.

javascript
mixpanel.people.increment('feature_usage', {
  'reports_tab_opens': 1
});

const adoptionScore = calculateAdoption(userActions);
mixpanel.people.set({
  'feature_adoption_score': adoptionScore,
  'most_used_feature': 'dashboards',
  'least_used_feature': 'reports'
});
Track feature adoption. Low adoption is often a precursor to churn.
Tip: Export churn cohorts from Mixpanel and cross-reference with your CRM, support tickets, or billing data. Churn is rarely random—there's usually a trigger event beforehand.

Common Pitfalls

  • Tracking only explicit churn (subscription cancellation) and missing silent churn (inactive for 60+ days but no formal cancellation).
  • Not capturing churn context like plan, LTV, or feature adoption—this makes it impossible to segment why users left or predict who's next.
  • Confusing retention with engagement. A user logging in weekly but never using features is not retained; track meaningful actions instead.
  • Ignoring early warning signals. Set up inactivity alerts so you can re-engage users before they cancel.

Wrapping Up

You're now capturing churn data, analyzing it with retention reports, and monitoring trends in real time. The next step is to act on it—build re-engagement campaigns for at-risk users and double down on features your retained users love. If you want to track churn automatically across tools and sync it to your CRM, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free