6 min read

How to Monitor Engagement Score in Mixpanel

Engagement score isn't a single metric—it's a composite of how frequently users interact with your product, how long they stay, and how valuable they are. Mixpanel doesn't calculate it for you, but you can build and monitor it by combining event tracking, user properties, and segmentation queries. Here's how.

Track Engagement Events with the SDK

Start by instrumenting your app to capture the actions that define engagement.

Initialize Mixpanel and track engagement events

Set up the Mixpanel JavaScript SDK and start tracking actions that indicate user engagement. Events like feature usage, API calls, and report generation are the raw material for your engagement score.

javascript
// Initialize Mixpanel
mixpanel.init('YOUR_TOKEN');

// Track key engagement events
mixpanel.track('Feature Used', {
  'feature_name': 'dashboard_view',
  'time_spent': 120,
  'user_type': 'premium'
});

mixpanel.track('API Call Made', {
  'endpoint': '/users',
  'status_code': 200
});

mixpanel.track('Report Generated', {
  'report_type': 'custom',
  'data_points': 500
});
Track events for every meaningful user action

Set user properties to track engagement dimensions

Use mixpanel.people.set() to store engagement-related properties on user profiles. These become queryable dimensions in Segmentation.

javascript
// Set engagement properties on the user profile
mixpanel.people.set({
  'total_events_this_month': 45,
  'days_active_this_month': 20,
  'feature_adoption': ['dashboard', 'reports', 'api'],
  'account_tier': 'premium',
  'last_active': new Date()
});

// Increment engagement counters
mixpanel.people.increment('total_engagements', 1);
mixpanel.people.increment('api_calls_this_month', 1);
Properties become your engagement dimensions for analysis

Use super properties to add context to all events

Set super properties once to include them in every subsequent event. This adds segment or cohort information without repeating it in every track() call.

javascript
// Set super properties
mixpanel.register({
  'customer_segment': 'enterprise',
  'onboarded_date': '2024-01-15',
  'region': 'US-East'
});

// All future events will include these properties
mixpanel.track('Report Generated');
// Event automatically includes customer_segment, onboarded_date, region
Watch out: Don't track every interaction. Focus on high-value actions—logging in, creating reports, calling APIs. Tracking every click inflates event counts and makes engagement analysis noisy.

Analyze Engagement Patterns in Segmentation

Once events are flowing, query them to identify engagement patterns and measure trends over time.

Build a segmentation query to measure engagement

Navigate to Segmentation in Mixpanel and filter users by event frequency and properties. You can count active users, measure feature adoption, or drill into specific cohorts.

javascript
// Query user engagement via the Data API
const params = new URLSearchParams({
  'data_grouping': 'singular',
  'unit': 'month',
  'event': 'Feature Used'
});

fetch(
  `https://data.mixpanel.com/api/2.0/segmentation?${params}`,
  {
    headers: {
      'Authorization': 'Basic ' + btoa('SERVICE_ACCOUNT:SECRET')
    }
  }
)
.then(res => res.json())
.then(data => {
  console.log('Monthly engagement:', data.results);
});
Use the Data API to programmatically fetch engagement metrics

Save a daily engagement report

In Segmentation, build a query showing your engagement metric (e.g., "users with 5+ Feature Used events this month"). Click Save Report, name it, and pin it to your dashboard for quick daily checks.

Create engagement cohorts for targeting

In Cohorts, create segments like "High Engagement" (10+ events this month) and "At Risk" (fewer than 2 events). Use these in feature flags, email campaigns, or support prioritization.

Tip: Build a 2×2 matrix: event frequency (high/low) × recency (active this week/inactive). This surfaces both engaged users and at-risk users who are churning.

Monitor Long-Term Engagement with Retention

Retention analysis shows whether users stay active over time—the truest signal of sustainable engagement.

Set up retention analysis for your core feature

In Retention, select a "starting event" (e.g., "Dashboard Viewed") and a "returning event" (e.g., "Feature Used"). Mixpanel shows the percentage of users who returned in week 1, 2, 3, etc.

javascript
// Track feature interactions for retention measurement
mixpanel.track('Dashboard Viewed', {
  'dashboard_type': 'custom',
  'time_spent': 300,
  'filters_applied': 2
});

mixpanel.track('Metric Added to Dashboard', {
  'metric_name': 'conversion_rate',
  'chart_type': 'line'
});

// In Mixpanel UI, configure Retention:
// Starting Event: "Dashboard Viewed"
// Returning Event: "Metric Added to Dashboard"
// Cohort Size: All users
// Interval: Weekly

Break retention down by segment

Add a Breakdown dimension (e.g., user_type or account_tier). This reveals whether premium users, free users, or specific cohorts have different retention—a strong signal of engagement quality differences.

Tip: Look for drop-offs in weeks 1-2 (onboarding friction) vs. weeks 3-4 (product-market fit issues). A steep cliff at week 1 means users aren't getting value fast enough.

Common Pitfalls

  • Treating raw event count as engagement. 100 events from someone frantically clicking isn't the same as 100 intentional feature uses. Pair frequency with properties like feature_adoption_count or time_spent to measure quality.
  • Skipping user properties and relying only on events. Without people.set(), you can't segment by engagement properties in Segmentation. You'll see only raw event counts, not patterns.
  • Confusing daily active users with engagement. High DAU but low feature diversity means users log in but don't explore. Monitor feature adoption alongside login frequency.
  • Ignoring cohort decay over time. A cohort that was 80% engaged three months ago might be 40% engaged now. Run retention curves by onboarding date to catch declining engagement early.

Wrapping Up

You've now built a multi-layered engagement monitoring system in Mixpanel: tracking events, setting properties, analyzing segments, and measuring retention curves. This gives you visibility into both new user engagement and long-term retention patterns. If you want to track this automatically across tools, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free