If your user engagement is quietly declining, you won't know until churn spikes. Amplitude lets you set up automated alerts that fire when your stickiness metrics drop—whether that's DAU/MAU ratio, return-user percentage, or cohort size. We'll walk through defining a stickiness metric, building a cohort, and setting up alerts that notify you the moment engagement tanks.
Define Your Stickiness Event
Pick the event that signals genuine engagement—something users do intentionally, not accidentally.
Choose an Intentional Engagement Event
For most products, this is query_executed, dashboard_created, report_viewed, or api_call_made—not page views. Go to Events > Event Definitions in Amplitude and confirm your event is tracked consistently. Avoid vanity events like page_load or session_start; they don't predict retention.
// Track meaningful engagement, not page loads
amplitude.track('report_created', {
report_type: 'custom_metrics',
created_by_user_id: userId,
workspace_id: workspaceId
});Verify Event Volume
Go to Events > Segmentation, search for your event, and plot it over the past 30 days. Look for consistent daily volume and repeat events from the same users. If the chart is flat or erratic, your event definition needs refining—or it's not the right stickiness signal.
// Query event counts via Amplitude API
const apiKey = process.env.AMPLITUDE_API_KEY;
const response = await fetch(
'https://amplitude.com/api/2/events?start_date=20260226&end_date=20260326',
{
headers: {
'Authorization': `Basic ${Buffer.from(apiKey + ':').toString('base64')}`
}
}
);
const data = await response.json();
console.log('Daily event volume:', data.data.series);Build Stickiness Cohorts
Cohorts let you segment users by recency of engagement. For stickiness, you'll build a cohort of users active in the last N days.
Create a 7-Day Active Users Cohort
In Amplitude, go to Audiences > Cohorts and click Create New Cohort. Add a rule: `<your_event>` occurred in the last 7 days. Name it active_users_7d. Save it. Amplitude recalculates this daily, so it always reflects users active in the rolling 7-day window.
// Query cohort size via API
const cohortId = 'YOUR_COHORT_ID';
const response = await fetch(
`https://amplitude.com/api/2/cohorts/${cohortId}`,
{
headers: {
'Authorization': `Basic ${Buffer.from(apiKey + ':').toString('base64')}`
}
}
);
const cohort = await response.json();
console.log('Active users (7d):', cohort.size);Create Additional Cohorts for Comparison
Build two more cohorts: active_users_1d (event in last 1 day) and active_users_30d (event in last 30 days). This gives you a complete stickiness picture. Your DAU/MAU ratio is active_users_1d / active_users_30d. Your DAU/WAU is active_users_1d / active_users_7d.
// Calculate stickiness ratios
const dau = 120; // active_users_1d
const wau = 450; // active_users_7d
const mau = 800; // active_users_30d
const stickinessWAU = (dau / wau * 100).toFixed(1) + '%';
const stickinessMAU = (dau / mau * 100).toFixed(1) + '%';
console.log(`DAU/WAU: ${stickinessWAU}, DAU/MAU: ${stickinessMAU}`);Configure Alerts
Now set up alerts so you're notified the moment stickiness dips.
Create a Stickiness Dashboard
Build a new dashboard and add three charts: (1) DAU trend (your 1-day cohort), (2) DAU/WAU ratio, (3) cohort size. This dashboard is your visual baseline. When cohort size drops 20% or your ratio falls below a threshold, you'll spot it fast.
// Log daily stickiness metrics for monitoring
const dailyMetrics = {
date: new Date().toISOString().split('T')[0],
dau: 120,
wau: 450,
mau: 800,
dau_wau_ratio: 0.267,
alert_threshold: 0.30
};
if (dailyMetrics.dau_wau_ratio < dailyMetrics.alert_threshold) {
console.error('Stickiness below threshold:', dailyMetrics);
}Enable Built-In Alerts
Click the Alert button on any chart (cohort size or ratio). Set the trigger: *"When value falls below 80% of the 7-day average"* or *"drops more than 20% day-over-day."* Choose your notification channel: Slack, Email, or Webhook. Amplitude checks this condition daily.
// Or use webhooks for custom alerting
const alertConfig = {
metric: 'cohort_size',
cohort_id: 'active_users_7d',
threshold: 400,
condition: 'less_than',
notify_url: process.env.WEBHOOK_URL
};
// Test webhook
await fetch(process.env.WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ test: true, alert: alertConfig })
});Test the Alert
Temporarily lower the threshold below the current value so the alert fires. Confirm you receive a notification. Reset the threshold to its real value. Check again 24 hours later to confirm the daily check is working.
// Validate alert logic before enabling
const validateAlert = (current, threshold) => {
const shouldFire = current < threshold;
console.log(
`Current: ${current}, Threshold: ${threshold}, ` +
`Will fire: ${shouldFire ? 'YES' : 'NO'}`
);
return shouldFire;
};
validateAlert(450, 300); // Should fireCommon Pitfalls
- Using session-based events—page views and sessions inflate during outages or bot traffic. Use intentional-action events only (feature usage, content creation).
- Ignoring day-of-week seasonality—most products see lower engagement on weekends or Mondays. Account for your natural curve when setting thresholds.
- Setting thresholds too tight—you'll get alert fatigue and stop responding. Use a 7-day moving average or set thresholds to 1–2 standard deviations below your baseline.
- Not excluding test accounts—if your test or demo accounts perform the event, they'll inflate cohort size and mask real problems.
Wrapping Up
You now have alerts that fire when user stickiness drops, so you can investigate and fix problems before churn accelerates. Check your dashboard weekly to spot trends—the goal is early detection, not chasing a metric. If you want to track stickiness automatically across all your tools and correlate drops with feature changes, Product Analyst can help.