6 min read

How to Visualize DAU WAU MAU in Mixpanel

Most product teams obsess over daily active users, but the real story lives in weekly and monthly retention. Mixpanel makes it easy to surface DAU, WAU, and MAU trends—if you know where to look.

Track User Activity Events

Before you can visualize active users, ensure Mixpanel is tracking meaningful user actions consistently.

Track Events Representing User Activity

Use mixpanel.track() to log when users engage with your product. Every tracked event contributes to your active user counts.

javascript
// Track user activity events
mixpanel.track('Page View', {
  'page_name': 'dashboard',
  'timestamp': new Date().getTime()
});

mixpanel.track('Query Executed', {
  'query_type': 'retention_analysis',
  'duration_ms': 1243
});

mixpanel.track('Export Generated', {
  'export_format': 'csv',
  'row_count': 5000
});
Track events that represent active user behavior

Set User Identity

Call mixpanel.identify() with a consistent user ID so Mixpanel counts each person once per day/week/month, not once per session.

javascript
// Identify the user before tracking events
mixpanel.identify(userId);

// All subsequent events are attributed to this user
mixpanel.track('Feature Accessed', {
  'feature': 'cohort_builder'
});
Consistent identity ensures accurate active user counts
Tip: A user counts as active only once per time window (day/week/month) even if they trigger multiple events. Focus on events that matter to your business.

Visualize with Retention and Events Reports

Mixpanel's built-in reports let you spot DAU/WAU/MAU trends without writing code.

Use the Retention Report for User Cohorts

In Mixpanel, go to Insights > Retention. Set the interval to Daily, Weekly, or Monthly. This shows how many distinct users return in each period.

Filter by a Specific Event (Optional)

Instead of counting all users, select a particular event like Purchase or Login to see active users for that motion only. Use the Activation Event dropdown.

View Cohort-Based Active Users

The chart shows returning user cohorts. For raw DAU/WAU/MAU (not cohort retention), check the Events report instead. Go to Insights > Events, pick your activation event, and use Group By > Date to see daily/weekly counts.

Watch out: The Retention report measures returning users, not absolute daily active users. For pure DAU/WAU/MAU, the Events report is clearer.

Query Active Users Programmatically via API

Export DAU/WAU/MAU data to dashboards or reports using Mixpanel's Insights API or Data Export API.

Authenticate and Build an Insights API Query

Use your Mixpanel project token to authenticate against the Insights API. Request unique user counts aggregated by day, week, or month.

javascript
const projectToken = 'YOUR_PROJECT_TOKEN';
const fromDate = '2025-03-19';
const toDate = '2025-03-26';

// Query DAU (daily active users)
const dauUrl = `https://mixpanel.com/api/2.0/insights?` +
  `event=Any&unit=day&from_date=${fromDate}&to_date=${toDate}&type=unique` +
  `&project_token=${projectToken}`;

fetch(dauUrl, {
  headers: { 'Authorization': 'Basic ' + btoa(projectToken + ':') }
})
  .then(res => res.json())
  .then(data => console.log('DAU:', data.data.values));
Query daily active user counts from Mixpanel's Insights API

Switch Units for Weekly and Monthly Views

Change unit=day to unit=week or unit=month to get WAU and MAU. Extend your date range to at least 30 days for reliable monthly numbers.

javascript
// Query WAU (weekly active users)
const wauUrl = `https://mixpanel.com/api/2.0/insights?` +
  `event=Any&unit=week&from_date=2025-03-01&to_date=2025-03-26&type=unique` +
  `&project_token=${projectToken}`;

// Query MAU (monthly active users)
const mauUrl = `https://mixpanel.com/api/2.0/insights?` +
  `event=Any&unit=month&from_date=2025-01-01&to_date=2025-03-26&type=unique` +
  `&project_token=${projectToken}`;
Adjust the unit parameter for different time windows

Filter by Event Type

Replace event=Any with a specific event name like event=Purchase to count only active users who performed that action.

javascript
// DAU for a specific event
const specificEventUrl = `https://mixpanel.com/api/2.0/insights?` +
  `event=Feature+Used&unit=day&from_date=2025-03-19&to_date=2025-03-26` +
  `&type=unique&project_token=${projectToken}`;

fetch(specificEventUrl, {
  headers: { 'Authorization': 'Basic ' + btoa(projectToken + ':') }
})
  .then(res => res.json())
  .then(data => console.log('DAU for Feature Used:', data));
Count unique users for a specific event only
Tip: Store API responses in a database or cache them hourly. Querying Mixpanel repeatedly throughout the day is slow—batch your queries at night.

Common Pitfalls

  • Not calling mixpanel.identify() before tracking—Mixpanel counts unique users per session, inflating your DAU if you skip identity
  • Tracking too many low-value events (every button hover, every keystroke)—this explodes your data volume and makes active user metrics noisy
  • Using the Retention report and assuming it shows raw DAU/WAU/MAU—it doesn't, it shows cohort retention rates. Check the Events report for absolute counts
  • Querying Mixpanel's API without date boundaries—results will be slow and may time out. Always specify from_date and to_date

Wrapping Up

You now have three levers to monitor active users: the Retention report for quick cohort views, the Events report for visual dashboards, and the Insights API for programmatic access. Watch your DAU/WAU/MAU ratios over time—a healthy product usually has a WAU:DAU ratio of 3–5x and a MAU:WAU ratio of 2–3x. If you want to track these metrics 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