6 min read

How to Monitor Churn Rate in PostHog

Churn is silent until it's too late. PostHog makes it visible by tracking which users stop returning and when. We'll set up event tracking, use retention insights to measure churn, and build a dashboard to catch drops in real time.

Set Up Churn Events

Start by defining what churn means in your product. For most SaaS, it's 'user didn't return in X days.' You'll need to track the events that indicate engagement.

Track user activity events

Capture the events that matter most to your product — signups, logins, feature usage. PostHog uses these to calculate retention. If a user hasn't triggered any events in 30 days, PostHog considers them inactive.

javascript
import posthog from 'posthog-js';

// Track user signup
posthog.capture('user_signup', {
  plan_type: 'free',
  signup_source: 'landing_page'
});

// Track feature usage
posthog.capture('dashboard_viewed', {
  dashboard_id: '12345',
  time_spent_seconds: 45
});

// Track user login
posthog.capture('user_login', {
  login_method: 'email'
});
Send events to PostHog whenever users interact with your product

Identify users with properties

Set user properties like plan tier, signup date, and region. These let you segment churn by customer type — e.g., 'free users churn faster than paid.'

javascript
posthog.identify('user_123', {
  email: '[email protected]',
  plan: 'pro',
  signup_date: '2025-06-01',
  company: 'Acme Corp',
  mrr: 99
});
Set user properties to slice churn by segment
Watch out: If you only track one event (e.g., login), PostHog will show high retention because you're measuring logins, not overall engagement. Track ALL meaningful actions.

Measure Churn with Retention Insights

PostHog's Retention insight is purpose-built for churn analysis. It shows what percentage of users return N days after a specific event.

Create a retention insight

Go to Insights > Retention. Choose the cohort event (e.g., 'user_signup') and the return event (e.g., 'user_login'). PostHog will calculate what % of users return after 1, 7, 14, and 30 days.

javascript
// Fetch retention data via PostHog API
const response = await fetch(
  'https://api.posthog.com/api/insights/?insight=RETENTION',
  {
    headers: {
      'Authorization': 'Bearer YOUR_POSTHOG_API_TOKEN'
    }
  }
);
const retentionInsights = await response.json();
Retrieve retention insights via PostHog API

Segment churn by user property

Filter the retention cohort by user properties. Click Add filter in the Retention insight and select a property like plan == 'free'. You'll see churn rates for each segment side-by-side.

Tip: Retention is calculated from a specific cohort event. If you choose 'user_signup', you're measuring how new users engage. For overall company churn, use 'user_login' as the cohort event instead.

Build a Churn Dashboard

A static retention insight is a snapshot. Build a dashboard that updates daily so you can spot churn spikes and act on them.

Create a dashboard card with churn SQL

Use Insights > SQL to write a custom query that calculates churn per cohort. Create a card that shows 'X% of users from 30 days ago are still active today.'

javascript
-- PostHog SQL: Calculate 30-day churn rate by signup month
SELECT
  toStartOfMonth(toDate(person_distinct_id_created_at)) as signup_month,
  countDistinct(person_id) as total_signups,
  countDistinct(
    CASE WHEN timestamp >= today() - 30 AND event IN ('user_login', 'feature_used')
    THEN person_id END
  ) as active_30d,
  round(
    100.0 * countDistinct(
      CASE WHEN timestamp >= today() - 30 THEN person_id END
    ) / countDistinct(person_id), 2
  ) as retention_percent
FROM events
WHERE event IN ('user_login', 'feature_used')
  AND person_distinct_id_created_at >= '2025-01-01'
GROUP BY signup_month
ORDER BY signup_month DESC;
Calculate cohort retention rates using PostHog SQL

Pin metrics to a shared dashboard

Create a Dashboard and add cards for: (1) Overall 30-day retention, (2) Retention by plan tier, (3) Churn by signup cohort. Set the dashboard to refresh every 24 hours. Share it with your ops team so everyone sees churn trends in real time.

Watch out: PostHog SQL queries on large datasets (millions of events) can be slow. Use LIMIT 50000 and filter by date range to keep queries fast.

Common Pitfalls

  • Defining churn too narrowly — e.g., 'user didn't log in' misses users who only view reports. Include ALL engagement events to avoid false positives.
  • Forgetting to set user properties — retention insights need properties like plan and signup_date to segment effectively. Without them, you can't tell if churn is concentrated in free users or high-value accounts.
  • Not accounting for seasonality — churn spikes around holidays and end of quarter. Compare month-over-month, not day-over-day, to spot real trends.
  • Using the wrong cohort event — if you measure retention from 'login', you're measuring login frequency, not product stickiness. Use the first meaningful action (signup, first dashboard view) to measure true retention.

Wrapping Up

You now have churn visibility in PostHog: event tracking captures when users disengage, retention insights show churn by cohort, and custom SQL queries surface trends. Pair this with alerts on your dashboard to catch churn spikes the day they happen. If you want to monitor churn automatically across tools and take action, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free