Catching retention rate drops early means you can act before churn becomes a bigger problem. Amplitude lets you set up alerts that notify you when retention dips below your target, so you're not manually checking dashboards every day.
Create a Retention Rate Chart
Start by building a retention chart if you don't already have one. This is the baseline for your alert.
Step 1: Navigate to Dashboard and Start a New Chart
Open Amplitude and click Create > New Chart. By default you'll land on the Events tab. You need to change the analysis type to see retention options.
// Initialize Amplitude SDK and track signup events
amplitude.getInstance().init('YOUR_API_KEY');
// Track user signup (this is your 'Start Event')
amplitude.getInstance().track('User Signed Up', {
user_id: 'user_123',
signup_source: 'organic',
timestamp: Date.now()
});Step 2: Switch to Retention Analysis
In the chart builder, look for the Analysis dropdown (usually at the top or left side). Select Retention. Amplitude will now show you retention-specific controls.
// Define what counts as 'retained' in your product
const trackRetentionEvent = (userId, daysActive) => {
// Track when user returns (Day 1, Day 7, Day 30, etc.)
amplitude.getInstance().track('User Returned', {
user_id: userId,
days_since_signup: daysActive,
event_type: 'retention_check'
});
};
// Call this when user logs back in
trackRetentionEvent('user_123', 1); // Day 1 retention checkStep 3: Choose Your Start and Return Events
Set your Start Event (the activation moment, usually *User Signed Up*) and your Return Event (the action that proves they came back, like *App Opened* or *Dashboard Viewed*). Amplitude will measure what percentage of users who triggered the Start Event also triggered the Return Event on Day 1, Day 7, Day 30, etc.
// Example: Track both start and return events with consistent structure
// Start Event - fired once per user
amplitude.getInstance().track('User Signed Up', {
user_id: 'user_123',
plan_type: 'free'
});
// Return Events - fired each time user does meaningful activity
amplitude.getInstance().track('App Opened', {
user_id: 'user_123',
session_id: 'session_abc',
platform: 'web'
});
amplitude.getInstance().track('Dashboard Viewed', {
user_id: 'user_123',
dashboard_type: 'main'
});user_id format is consistent across all events. If your Start Event uses email as user_id but Return Events use numeric IDs, retention will show as zero.Set Up the Alert Rule
Once your retention chart is displaying data, you can attach an alert that watches for drops.
Step 1: Click the Alert Icon on Your Chart
In the top-right corner of your retention chart, click the bell icon to open the alert builder. If you don't see it, make sure your chart is saved first.
// Use Amplitude's REST API to programmatically fetch retention data
const getRetentionData = async (apiKey, secretKey, startDate, endDate) => {
const response = await fetch('https://api.amplitude.com/api/2/events/export', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
start: startDate,
end: endDate,
metrics: ['retention']
})
});
return response.json();
};
const data = await getRetentionData(API_KEY, SECRET_KEY, '20260101', '20260331');Step 2: Set the Threshold Condition
Choose how to define the alert trigger: below [X]% (e.g., "alert if retention drops below 35%") or down [X]% (e.g., "alert if retention drops 10% day-over-day"). Pick a threshold that matters for your business—too aggressive and you'll get alert fatigue; too loose and you'll miss real problems.
// Example logic for determining if a retention alert should fire
const evaluateRetentionAlert = (currentRetention, previousRetention, alertConfig) => {
// Alert type 1: Absolute threshold
if (alertConfig.type === 'absolute') {
if (currentRetention < alertConfig.threshold) {
console.log(`Alert: Retention at ${(currentRetention * 100).toFixed(1)}% (below ${alertConfig.threshold * 100}%)`);
return true;
}
}
// Alert type 2: Percentage drop
if (alertConfig.type === 'drop') {
const percentDrop = ((previousRetention - currentRetention) / previousRetention) * 100;
if (percentDrop > alertConfig.dropPercent) {
console.log(`Alert: Retention dropped ${percentDrop.toFixed(1)}%`);
return true;
}
}
return false;
};
// Example: Alert if Day 7 retention < 40% OR drops more than 8%
evaluateRetentionAlert(0.35, 0.42, { type: 'drop', dropPercent: 8 });Step 3: Configure Who Gets Notified and When
Select your notification channels: Email, Slack, PagerDuty, or Webhooks. Specify recipients (you, your team, a manager, etc.) and frequency (immediate, daily digest, weekly summary). For Slack, make sure you've authorized Amplitude's Slack app in your workspace first.
// Example: Send custom alert payload to your own webhook endpoint
const sendRetentionAlertWebhook = async (webhookUrl, retentionMetrics) => {
const payload = {
alert_type: 'retention_drop',
timestamp: new Date().toISOString(),
metrics: {
day_1_retention: retentionMetrics.day1,
day_7_retention: retentionMetrics.day7,
day_30_retention: retentionMetrics.day30,
threshold: 0.40,
triggered: retentionMetrics.day7 < 0.40
},
amplitude_dashboard_url: 'https://analytics.amplitude.com/your-org/dashboard/retention-chart'
};
const response = await fetch(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
return response.status === 200;
};
const fired = await sendRetentionAlertWebhook(WEBHOOK_URL, { day1: 0.80, day7: 0.38, day30: 0.25 });Common Pitfalls
- Forgetting to filter retention by cohort—a 45% overall Day 7 retention might hide that your paid users are at 65% retention while free users are at 30%. One group's churn can mask another's improvement.
- Setting alerts on total user counts instead of cohort retention—you'll get false alarms when signups simply slow down, not because existing users are churning.
- Setting alert thresholds too tight—if you alert on every 2% drop, you'll get notifications almost daily from normal variance and stop reading them. Most teams start with 5–10% drops or 5-percentage-point absolute changes.
- Alerting on the wrong cohort event—if your 'Return Event' is too common (like 'Page Loaded'), you'll overcount retained users. If it's too rare (like 'Made Purchase'), you'll undercount and retention will look terrible.
Wrapping Up
You now have a retention alert that watches for drops without requiring daily dashboard checks. When thresholds are breached, your team gets notified immediately instead of discovering churn during a weekly sync. If you want to track retention automatically across tools, Product Analyst can help.