5 min read

How to Calculate Engagement Score in Mixpanel

Engagement is the difference between users who log in once and disappear versus those who make it part of their routine. But how do you actually measure it? In Mixpanel, engagement isn't a single metric—it's something you build by combining event frequency, recency, and the types of actions users take. This guide shows you how to set up a real engagement scoring system.

Track Your Engagement Events

Before you can score engagement, define what engagement looks like in your product. This means identifying the specific actions that signal a user is getting real value.

Send engagement events from your app

Track meaningful user actions using the Mixpanel SDK. These events become the building blocks of your engagement score. Focus on actions like creating reports, viewing dashboards, or exporting data—not every click.

javascript
mixpanel.track('Dashboard Viewed', {
  'dashboard_type': 'revenue',
  'time_spent_seconds': 120
});

mixpanel.track('Report Created', {
  'report_type': 'cohort_analysis',
  'is_saved': true
});

mixpanel.track('Data Exported', {
  'export_format': 'csv',
  'rows_exported': 5000
});
Send event data for each engagement action

Validate events in Mixpanel

Open the Live View tab in Mixpanel's data browser to confirm events are arriving correctly. You should see your events appear in real-time as users interact with your app. Verify that event properties are being captured accurately.

Tip: Focus on 3–5 key engagement events, not every action. Too many events dilute your signal and make scoring unnecessarily complex.

Build User Engagement Metrics

Once you're sending events, use user properties to track engagement indicators on each user's profile. This makes it easy to segment and score users later.

Set user properties to track engagement frequency

After a user performs an engagement action, update their user profile in Mixpanel to track how often they engage. Use mixpanel.people.set() to store metrics like last action date and action count.

javascript
mixpanel.track('Dashboard Viewed', {
  'dashboard_type': 'revenue'
});

// Update user properties to track engagement
mixpanel.people.set({
  'Last Dashboard View': new Date().toISOString(),
  'Total Dashboards Viewed': 1
});

// For first-time users, set initial properties
mixpanel.people.set_once({
  'First Engagement Date': new Date().toISOString()
});
Update user properties after each engagement action

Track engagement breadth (action diversity)

Engagement isn't just frequency—it's trying different features. Add a property that tracks how many different types of actions a user has taken. This prevents users who repeat one action from scoring too high.

Watch out: User properties have a 25-property soft limit. Don't create separate properties for every event variation—aggregate them like 'Total Reports Created' instead of 'Q1 Reports Created', 'Q2 Reports Created', etc.

Create Engagement Cohorts and Calculate Scores

Now that you're tracking engagement signals, use Mixpanel's Cohorts feature to segment users into engagement tiers. This is your engagement score in practice.

Calculate and store engagement tiers

Compute engagement scores based on recency and frequency. Combine your user properties to assign each user to an engagement tier. Store the result as a property so you can segment by it in Mixpanel reports.

javascript
function calculateEngagementTier(user) {
  const lastAction = new Date(user['Last Dashboard View']);
  const daysSince = Math.floor((Date.now() - lastAction) / (1000 * 60 * 60 * 24));
  const actionCount = user['Total Dashboards Viewed'] + user['Total Reports Created'];
  
  // Tier logic: recent + frequent = high engagement
  if (daysSince < 7 && actionCount >= 2) return 'high';
  if (daysSince < 30 && actionCount >= 1) return 'medium';
  if (daysSince < 60) return 'at_risk';
  return 'inactive';
}

mixpanel.people.set({
  'Engagement Tier': calculateEngagementTier(user),
  'Last Engagement Score Updated': new Date().toISOString()
});
Calculate engagement tier based on user properties

Create engagement cohorts in Mixpanel

In Mixpanel, go to Cohorts > Create Cohort and build tiers based on your calculated engagement property. Create 'High Engagement' (tier = high), 'Medium Engagement' (tier = medium), and 'At Risk' (tier = at_risk). These cohorts let you segment users instantly in any report.

Use engagement cohorts for action

Now apply these cohorts. Filter reports to see what high-engagement users have in common. Create retention campaigns targeting at-risk users. Analyze feature adoption separately for each tier. In Mixpanel, you can filter any visualization by cohort membership.

Tip: Adjust your tier thresholds based on your product baseline. If most users perform 3+ events per week, 'High Engagement' should require 5+ events, not 2. Monitor your cohort sizes—if one tier contains 95% of users, your thresholds are too loose.

Common Pitfalls

  • Tracking too many events: Each event adds noise to your signal. Stick to 3–5 core actions that indicate product value.
  • Ignoring recency: A user with 100 actions from last year but nothing recently isn't engaged. Always weight recent activity heavily.
  • Using vanity metrics: 'Page Views' or 'Logins' don't signal engagement. Choose actions that indicate real product value like 'Report Saved' or 'Dashboard Exported', not 'Page Loaded'.
  • Not segmenting by user maturity: A 2-week-old user naturally has lower action counts than a 12-month veteran. Either create separate engagement formulas per user age or adjust thresholds per cohort.

Wrapping Up

You now have an engagement scoring system in Mixpanel that identifies your most active users, segments them into tiers, and lets you act on the data. Use these cohorts to guide retention campaigns, prioritize feature development, and identify churn risks early. If you want to track engagement automatically across multiple analytics tools and unify scoring logic, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free