Retention is the metric that actually matters. Amplitude's Retention analysis shows you exactly which users come back—and which ones disappear. Unlike sign-ups or downloads, retention tells you if users find real value.
Instrument Event Tracking for Retention
Retention requires two events: one that marks entry into a cohort (usually signup) and one that marks return (usually app open or a key action). Get the events right, and the numbers become meaningful.
Initialize the Amplitude SDK
Install the JavaScript SDK and initialize it with your API key. This is the base layer for all event tracking.
import * as amplitude from '@amplitude/analytics-browser';
amplitude.init('YOUR_API_KEY', {
userId: 'user123',
});
// Set properties that you'll segment retention by later
amplitude.setUserProperties({
plan: 'pro',
signupDate: new Date().toISOString().split('T')[0],
region: 'US',
});Track the Starting Event
Fire a consistent event when a user enters your cohort. For new user retention, track Sign Up. For reactivation, track Reactivated. Be explicit about what defines entry.
// On signup
amplitude.track('Sign Up', {
signupMethod: 'google',
plan: 'free',
referralSource: 'organic',
});
// Or on account reactivation
amplitude.track('Reactivated', {
daysInactive: 45,
reason: 'email_campaign',
});Track the Returning Event
Define what counts as 'returning.' App Opened is the standard for daily retention. But you might use Create Project or Complete Analysis if you care about engagement, not just logins.
// Track every meaningful return
amplitude.track('App Opened', {
appVersion: '2.1.0',
source: 'direct',
});
// Or track deeper engagement
amplitude.track('Create Project', {
projectType: 'cohort_analysis',
templateUsed: false,
});Create and Configure Retention Analysis
Once events flow in, the Retention chart in Amplitude shows you cohorts and return rates. Set it up once, then come back weekly to monitor.
Open the Retention Chart
Click Retention in the left sidebar. Amplitude opens a retention matrix showing cohorts down the left (by signup date) and return windows across the top (Day 1, Day 2, etc.).
// No SDK code here—this is UI-driven
// The workflow in Amplitude:
// 1. Click "Retention" in sidebar
// 2. Choose Starting Event: "Sign Up"
// 3. Choose Returning Event: "App Opened"
// 4. Set Interval: "Day" (daily cohorts)
// 5. Set Window: "7" (show D0 through D6)
// 6. Amplitude auto-calculates and displays the matrixSegment Retention by User Cohorts
Click Breakdown by and select a user property like plan, signupCountry, or referralSource. Amplitude splits retention by that dimension. This reveals which cohorts are healthy and which are at risk.
// Prepare the data at event time
amplitude.track('Sign Up', {
plan: 'enterprise', // Use this for breakdown
companySize: 'large',
industry: 'fintech',
});
// Then in Amplitude UI:
// Click "Breakdown by" → Select "plan"
// Result: separate matrices for free, pro, enterprise
// You'll see pro has 45% day-7 retention, free has 15%Adjust the Window and Interval
Change interval from Day to Week for longer-term patterns. Extend the window from 7 to 14 or 30 days if you need to track long-term stickiness. Weekly cohorts are noisier but show bigger trends.
// Configuration note:
// Day interval: Shows cohorts grouped by signup date (daily)
// 7-day window: Shows columns for D0, D1, D2 ... D6
// Week interval: Groups signups by week, columns are W0, W1, W2 ...
// Adjust in the Retention UI dropdowns, not in codeMonitor and Act on Retention Trends
Set a baseline, check weekly, and flag drops. Retention is a leading health indicator—a 10% drop usually signals a problem you'll feel in churn metrics next month.
Export Retention Data for External Dashboards
Click the Export button (or use the API) to pull retention numbers into a spreadsheet, Tableau, or Datadog. This lets you track retention alongside other metrics and set automated alerts.
// Query events via Amplitude's REST API to build custom retention calcs
const API_KEY = process.env.AMPLITUDE_API_KEY;
const SECRET_KEY = process.env.AMPLITUDE_SECRET_KEY;
const getEvents = async (startDate, endDate) => {
const response = await fetch(
`https://api2.amplitude.com/api/2/events?start=${startDate}&end=${endDate}`,
{
headers: {
Authorization: `Bearer ${API_KEY}`,
},
}
);
return response.json();
};
// For weekly monitoring
const cohortDate = '2026-03-19';
const events = await getEvents(cohortDate, '2026-03-26');Set Baseline Thresholds and Alert on Drops
Know your normal. If day-7 retention is usually 35%, a drop to 25% is a red flag. Set a simple rule: if any segment drops more than 20% from baseline, investigate. Create a Slack alert or email notification.
// Example monitoring logic
const baseline = { day1: 0.65, day7: 0.35, day30: 0.18 };
const current = { day1: 0.62, day7: 0.22, day30: 0.12 }; // Today's data
const dropPercent = ((baseline.day7 - current.day7) / baseline.day7) * 100; // 37% drop
if (dropPercent > 20) {
console.error(`ALERT: Day-7 retention dropped ${dropPercent.toFixed(0)}%`);
// Send to Slack, email, or incident tracker
}Compare Cohorts and Identify Root Cause
When retention drops, drill into your breakdowns. Is it all cohorts or just one plan? One region? Check if you shipped a breaking change, increased pricing, or had an outage on that date.
// Use cohort analysis alongside feature flags or deployment dates
// Example: Day-7 retention for cohorts that signed up before/after March 1
const before = { date: '2026-02-25', day7Retention: 0.38 };
const after = { date: '2026-03-05', day7Retention: 0.22 }; // Drop after March 1 deploy
// Hypothesis: deployed feature X broke something
// Action: Check logs, revert, re-measure
console.log(`Retention cliff on March 1: ${after.day7Retention * 100}%`);
// Investigate deployment diff from that dateCommon Pitfalls
- Confusing retention rate with returning users. 25% retention means 25 out of 100 users returned, not 25 users total. Always use percentage to avoid talking past your team.
- Picking the wrong events. If you track App Opened for every session but also Screen Viewed (which fires per page), Amplitude counts them separately. Choose one returning behavior and stick with it.
- Ignoring incomplete cohorts. A cohort from March 20 won't show full day-7 retention until March 27. Don't panic if the latest cohort looks bad—wait for the data to settle.
- Not segmenting by plan or user type. Free users have different retention than paid users. Enterprise has different curves than SMB. Always break down retention to understand what's actually happening.
Wrapping Up
Monitoring retention in Amplitude is straightforward: wire up signup and returning events, run the Retention chart, segment by plan or cohort, and check weekly for drops. The hard part is acting on it fast enough. If you need to track retention across all your tools without building custom dashboards, Product Analyst can help.