Your DAU dropped 15% overnight and you didn't catch it until the next morning standup. Mixpanel lets you set up alerts on DAU, WAU, and MAU so you get notified in real time when these metrics move. Here's how to configure alerts that actually tell you when something's wrong.
Create a Retention Cohort for DAU Tracking
DAU is the foundation — you need to measure it before you can alert on it.
Step 1: Navigate to the Retention report
In Mixpanel, go to Analyze > Retention. This view lets you track how many unique users return each day, week, or month. You'll see a retention matrix where the first column is your Day 0 cohort (all users active on that day).
// Track events that represent daily active users
mixpanel.identify(user_id);
mixpanel.track('App Opened', {
'User Type': 'free',
'Device': 'ios',
'App Version': '2.1.0',
'Timestamp': new Date().toISOString()
});Step 2: Set retention event and cohort interval
Select the event that represents an active user (e.g., App Opened, Pageview, or Purchase). Choose Day for the cohort interval to measure DAU. Your retention table will show unique users on Day 0, Day 1, Day 2, and so on.
// Fetch DAU via Mixpanel's retention API
const fetchDAU = async (token, eventName = 'App Opened') => {
const today = new Date().toISOString().split('T')[0];
const response = await fetch(
`https://mixpanel.com/api/2.0/retention?` +
`from_date=${today}&to_date=${today}&` +
`event=${encodeURIComponent(eventName)}&interval=day&` +
`api_key=${token}`
);
const data = await response.json();
// Day 0 value = DAU for that date
return data.data[today][0];
};
const dau = await fetchDAU(mixpanelToken);mixpanel.identify() early in your app so every user gets tracked consistently.Build a Dashboard Board with DAU WAU MAU Cards
Retention reports are useful, but you need a live dashboard to monitor these metrics every day.
Step 1: Create a new Board
In Mixpanel, go to Boards and click Create Board. Name it something like "User Health Dashboard". This board is where you'll add retention cards for DAU, WAU, and MAU and set up alerts.
// Build a dashboard object to track all three metrics
const dashboardMetrics = {
dau: {
name: 'Daily Active Users',
event: 'App Opened',
interval: 'day',
threshold: 5000
},
wau: {
name: 'Weekly Active Users',
event: 'App Opened',
interval: 'week',
threshold: 15000
},
mau: {
name: 'Monthly Active Users',
event: 'App Opened',
interval: 'month',
threshold: 50000
}
};
console.log('Dashboard metrics configured:', dashboardMetrics);Step 2: Add Retention cards for each metric
Click + Add Card > Retention. Create three cards: one with Day interval (DAU), one with Week interval (WAU), and one with Month interval (MAU). Each card shows cohort curves and the Day 0 value is your active user count.
// Fetch all three metrics in one call
const getActiveUserMetrics = async (token) => {
const today = new Date().toISOString().split('T')[0];
const eventName = 'App Opened';
const fetchRetention = async (interval) => {
const response = await fetch(
`https://mixpanel.com/api/2.0/retention?` +
`from_date=${today}&to_date=${today}&` +
`event=${encodeURIComponent(eventName)}&interval=${interval}&` +
`api_key=${token}`
);
return response.json();
};
const [dau, wau, mau] = await Promise.all([
fetchRetention('day'),
fetchRetention('week'),
fetchRetention('month')
]);
return {
dau: dau.data[today][0],
wau: wau.data[today][0],
mau: mau.data[today][0],
timestamp: today
};
};
const metrics = await getActiveUserMetrics(mixpanelToken);Configure Alerts and Notifications
Set up alerts so you're notified when DAU, WAU, or MAU cross your thresholds.
Step 1: Add an alert rule to a card
On your DAU card, click the ⋮ menu and select Add Alert. Set a threshold—for example, alert if DAU drops below 5,000 or exceeds 12,000. Mixpanel triggers the alert when that condition is met.
// Example alert configuration structure
const alertConfig = {
board_id: 'board_user_health',
card_id: 'card_dau',
metric_event: 'App Opened',
retention_interval: 'day',
condition: 'less_than',
threshold: 5000,
notification_type: 'slack',
frequency: 'once_per_hour',
enabled: true
};
// In Mixpanel UI: Boards > Card menu > Add Alert > Configure threshold and channelStep 2: Choose notification channels
In alert settings, pick Email, Slack, or Webhook. Email sends to your Mixpanel account. Slack requires connecting your workspace (go to Settings > Integrations > Slack). Webhook sends a POST request to your backend with the alert payload.
// Handle Mixpanel webhook alerts on your server
const handleMixpanelAlert = (req, res) => {
const alert = req.body; // {
// board_id: '...',
// card_id: '...',
// metric_value: 4200,
// threshold: 5000,
// condition: 'less_than',
// timestamp: '2026-03-26T09:15:00Z'
// }
const message = `⚠️ DAU Alert: ${alert.metric_value} (threshold: ${alert.threshold})`;
// Forward to Slack
fetch(process.env.SLACK_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: message,
blocks: [
{ type: 'section', text: { type: 'mrkdwn', text: `*DAU Alert*\nValue: ${alert.metric_value}\nThreshold: ${alert.threshold}` } }
]
})
});
res.status(200).json({ received: true });
};
app.post('/api/mixpanel-alert', handleMixpanelAlert);Step 3: Set alert frequency and silence rules
Configure how often alerts trigger: Once per day, Once per hour, or Every time. "Once per day" prevents spam if DAU stays below threshold all day. You can also temporarily silence alerts during deployments in Board Settings.
// Silence alerts during maintenance windows
const silenceAlerts = async (boardId, silenceUntil) => {
// This is UI-driven in Mixpanel, but here's the concept
const payload = {
board_id: boardId,
alerts_silenced_until: silenceUntil.toISOString(),
reason: 'Maintenance deployment'
};
// In practice: Board > Settings > Silence Alerts > Set time
console.log('Alert silencing configured until:', silenceUntil);
return payload;
};
// Silence for 30 minutes starting now
const now = new Date();
const silenceUntil = new Date(now.getTime() + 30 * 60 * 1000);
await silenceAlerts('board_user_health', silenceUntil);Common Pitfalls
- Forgetting to call
mixpanel.identify()with unique user IDs before tracking events. Without it, Mixpanel treats every anonymous session as a different user, inflating your active user counts. - Using retention events that fire constantly (Background Sync, Server Ping, Heartbeat) instead of real user actions. This inflates DAU/WAU/MAU and makes thresholds unreliable. Stick to user-initiated events.
- Ignoring time zone offsets when setting alert thresholds. Mixpanel's calendar days are in your project's time zone. A 10 PM drop looks like a midnight drop if you're comparing UTC to local time.
- Not segmenting your active user metrics by cohort. An overall DAU drop might be fine if it's only in a region you're sunsetting. Always check Segmentation to break DAU/WAU/MAU by platform, region, or plan type.
Wrapping Up
You now have DAU, WAU, and MAU metrics flowing into Mixpanel with alerts that notify you when they move. Set thresholds that align with your business model—maybe 10% below your 7-day rolling average—and route alerts to the team that owns user growth. If you want to track these metrics automatically across Mixpanel and other analytics tools, Product Analyst can help.