Knowing who's actively using your product is foundational to retention analysis. Mixpanel doesn't calculate engagement score for you — you need to define what engagement means (frequency of key actions, time spent, feature adoption), track it, and then build reports to slice your user base by engagement tier. Let's walk through how to do this.
Define and Track Engagement Events
Engagement happens through specific actions. Start by choosing which events define engagement in your product.
Identify Your Engagement Events
Think through the actions that indicate a user is engaged: opening the dashboard daily, running an analysis, exporting data, inviting team members. Pick 2–5 core actions that correlate with retention or revenue. This keeps your score meaningful instead of noise.
Calculate Engagement Score Server-Side
Rather than tracking a raw score, calculate it in your backend and set it as a user property. Use a formula: points per event type × count of recent events + recency bonus. Update it daily or weekly so Mixpanel always has fresh data.
// After calculating engagement_score in your backend
mixpanel.track('User Activity', {
'user_id': userId,
'engagement_score': engagementScore,
'engagement_tier': engagementScore > 75 ? 'High' : engagementScore > 40 ? 'Medium' : 'Low'
});
mixpanel.people_set(userId, {
'Engagement Score': engagementScore,
'Engagement Tier': engagementScore > 75 ? 'High' : engagementScore > 40 ? 'Medium' : 'Low',
'Last Engagement': new Date().toISOString()
});Create User Cohorts by Engagement Tier
In Mixpanel, navigate to Cohorts and create segments for high, medium, and low engagement. Use the Engagement Score property with numeric ranges. Save each as a reusable cohort so you can filter any report by engagement tier.
Visualize Engagement in Reports
With engagement tracked, build reports that show your user base broken down by engagement level.
Build a Segmentation Report
Go to Reports > Segmentation. Select your engagement event (e.g., User Activity). Group by Engagement Tier to see how many users fall into each segment. Add a second breakdown by Engagement Score (numeric ranges) to get finer granularity.
// Using Mixpanel Data API to fetch segmentation data
const params = new URLSearchParams({
'event': 'User Activity',
'unit': 'day',
'interval': 30,
'on': 'properties["Engagement Tier"]'
});
const response = await fetch(
`https://mixpanel.com/api/2.0/segmentation?${params}`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
const data = await response.json();Add Engagement Tier to Funnels
Go to Reports > Funnels and build a conversion funnel (e.g., Sign Up → Dashboard Opened → Report Exported). Under Breakdowns, add Engagement Tier. This shows whether high-engagement users convert better through your product funnel.
Create a Retention Cohort by Engagement Score
In Retention, choose Cohort > Property-based and cohort by Engagement Tier. Then measure return rate over weeks. High-engagement cohorts should have better retention — if not, investigate why your most active users are churning.
// Track a regular heartbeat event for retention analysis
mixpanel.track('Weekly Active', {
'user_id': userId,
'engagement_score': engagementScore,
'engagement_tier': tier,
'timestamp': Math.floor(Date.now() / 1000)
});
// Query retention by engagement tier
const retention = await fetch(
'https://mixpanel.com/api/2.0/retention?event=Weekly Active&on=properties["engagement_tier"]',
{ headers: { 'Authorization': `Bearer ${token}` } }
).then(r => r.json());Build an Engagement Dashboard
Combine engagement reports into a single dashboard for quick visibility.
Add Engagement Breakdown Widgets
Create a new Dashboard in Mixpanel. Add a Segmentation card showing event counts by Engagement Tier. Add a Table card showing user counts per tier. Use formulas to calculate churn rate per engagement tier.
Filter Dashboard by Date Range and Segment
Add dashboard filters for Date Range, Engagement Tier, and optionally Plan Type or Company. This lets you isolate engagement patterns by customer segment. Save the dashboard and share it with your product or CS team.
Monitor Engagement Trends Over Time
Add a Line Chart showing average Engagement Score per week. If the trend is flat or declining, investigate feature adoption or usage friction. Compare engagement trends before and after a feature launch to measure impact.
// Track feature launches to correlate with engagement trends
mixpanel.track('Feature Launched', {
'feature_name': 'advanced_filters',
'target_segments': ['high_engagement', 'medium_engagement'],
'launch_date': new Date().toISOString()
});
// Later, query engagement trends
const trends = await fetch(
'https://mixpanel.com/api/2.0/events/properties/values?event=User Activity&name=Engagement Score&unit=week',
{ headers: { 'Authorization': `Bearer ${token}` } }
).then(r => r.json());Common Pitfalls
- Using too many events in your engagement formula. Four or five key actions work better than ten; too many dilute the signal.
- Forgetting to track inactive users. If only engaged users trigger events, you can't see who's disengaged. Add a weekly heartbeat signal.
- Recalculating engagement scores too frequently. Daily updates create noise; weekly or bi-weekly captures meaningful trends without false positives.
- Not comparing engagement to retention or revenue. Engagement should correlate with business outcomes; if it doesn't, your engagement definition is wrong.
Wrapping Up
You now have engagement scores tracked, visualized in segmentation and cohort reports, and dashboarded for monitoring. You can identify your highest-value users, watch trends over time, and test whether features improve engagement. If you want to track this automatically across all your analytics tools and sync engagement scores to your CRM, Product Analyst can help.