5 min read

How to Track DAU/MAU Ratio in Amplitude

Your DAU/MAU ratio is one of the clearest signals of product stickiness. A ratio above 0.3 usually means users come back regularly; below 0.2 signals leakage. Amplitude gives you the raw numbers to calculate this, but most teams don't look at it systematically. Here's how to track it properly.

Access DAU and MAU in Amplitude

Amplitude automatically calculates daily and monthly active users. You just need to pull them from the right place.

Open the Active Users dashboard

Go to Analytics > Active Users in Amplitude. You'll see a chart with DAU and MAU displayed side by side, with historical trends. This is your source of truth for both metrics.

javascript
// Fetch active users data via Amplitude API
const apiKey = process.env.AMPLITUDE_API_KEY;
const secretKey = process.env.AMPLITUDE_SECRET_KEY;

const auth = Buffer.from(`${apiKey}:${secretKey}`).toString('base64');

fetch('https://api2.amplitude.com/api/2/users/active', {
  method: 'GET',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
})
.then(res => res.json())
.then(data => {
  console.log('DAU:', data.daily_active_users);
  console.log('MAU:', data.monthly_active_users);
});
Fetch DAU and MAU from Amplitude's API for automated tracking

Record both metrics daily

Pull both DAU and MAU every day at the same time. Store them in a spreadsheet, database, or data warehouse. This gives you a time series to spot trends. DAU comes from today's count, while MAU is the rolling 30-day active users.

javascript
// Calculate and log the DAU/MAU ratio daily
const dau = 4200;
const mau = 18500;
const ratio = (dau / mau).toFixed(3);
const percentage = (ratio * 100).toFixed(1);

console.log(`DAU/MAU Ratio: ${ratio} (${percentage}%)`);
// Output: DAU/MAU Ratio: 0.227 (22.7%)
Simple division to calculate the ratio once you have DAU and MAU
Watch out: Amplitude's API data updates with a 1-day lag. If you query at midnight, you get yesterday's final numbers, not today's in-progress data.

Create Cohorts to Segment User Activity

The raw ratio tells you overall health, but cohorts let you segment users by engagement level and find where retention is actually breaking.

Build cohorts for different activity windows

Go to Cohorts > Create New Cohort and define separate cohorts: one for users active in the last 7 days, another for last 30 days, and one for never active. Name them clearly (e.g., "Active (L7D)", "Active (L30D)"). Save each cohort for reuse.

javascript
// Track a user as active by logging a custom event
amplitude.track('user_engagement', {
  activity_type: 'page_view',
  timestamp: Date.now(),
  user_engaged: true,
});

// This event becomes the basis for your activity cohorts
amplitude.track('feature_usage', {
  feature_name: 'dashboard',
  usage_count: 1,
});
Log engagement events that underpin your activity-based cohorts

Compare cohort size to MAU

Once a cohort is saved, check its size in Cohorts > [Cohort Name]. Divide cohort size by MAU to get an engagement percentage. If your L7D cohort has 5,000 users and MAU is 20,000, that's 25%—equivalent to a 0.25 ratio.

javascript
// Query cohort membership count
const cohortId = 'active-l7d';

fetch(`https://api2.amplitude.com/api/2/cohort/${cohortId}`, {
  method: 'GET',
  headers: {
    'Authorization': `Basic ${auth}`,
  },
})
.then(res => res.json())
.then(data => {
  const cohortSize = data.size;
  const mau = 20000;
  const engagementPercent = ((cohortSize / mau) * 100).toFixed(1);
  console.log(`Engagement (L7D): ${engagementPercent}%`);
});
Pull your cohort's member count to validate engagement metrics
Tip: Create cohorts by signup month or feature adoption date, not just activity window. This reveals whether engagement drops after a certain age or feature launch.

Monitor Ratio Changes Over Time

Sudden drops in DAU/MAU often signal churn or a feature regression. Set up visibility so you catch it early.

Build a trend chart

In Analytics > Graphs, create a new line chart that plots your calculated ratio over the last 60–90 days. Add it to a dashboard you check daily. The trend matters more than the absolute number.

javascript
// Store daily DAU/MAU ratios for trending
const dailyRatios = [
  { date: '2025-03-24', dau: 4200, mau: 18500, ratio: 0.227 },
  { date: '2025-03-25', dau: 4100, mau: 18600, ratio: 0.220 },
  { date: '2025-03-26', dau: 3800, mau: 18700, ratio: 0.203 }, // Drop detected
];

const trend = dailyRatios[dailyRatios.length - 1].ratio - dailyRatios[0].ratio;
console.log(`Ratio trend over 3 days: ${(trend * 100).toFixed(1)}% change`);
// Output: Ratio trend over 3 days: -2.4% change
Track ratio changes week-over-week and month-over-month

Set up alerts for drops

Amplitude doesn't natively alert on custom ratios, but you can export data to Slack via webhooks or use an external tool (Looker, Data Studio) to set thresholds. Alert when ratio drops below your historical average + 2 standard deviations.

javascript
// Send alert to Slack when ratio drops
const currentRatio = 0.203;
const threshold = 0.22;

if (currentRatio < threshold) {
  const slackWebhook = process.env.SLACK_WEBHOOK_URL;
  
  fetch(slackWebhook, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      text: `⚠️ DAU/MAU ratio dropped to ${currentRatio.toFixed(3)}. Was ${threshold.toFixed(3)}.`,
      blocks: [{
        type: 'section',
        text: { type: 'mrkdwn', text: `*Engagement Alert* \n DAU/MAU: ${currentRatio.toFixed(3)} (threshold: ${threshold.toFixed(3)})` }
      }],
    }),
  });
}
Automate Slack alerts when your ratio falls below a safe threshold
Tip: Compare week-over-week, not day-over-day. Daily noise is normal; if your ratio is down 5%+ week-over-week, investigate.

Common Pitfalls

  • Confusing DAU (any user with any event in a day) with actual engagement. A user who hits your site once counts as DAU. Use cohorts with intentional events (signups, feature usage, not just pageviews) to measure real stickiness.
  • Pulling MAU as exactly 30 days when your business runs on a different cycle. If you bill monthly or operate weekly cohorts, align your MAU window to your actual business calendar.
  • Forgetting the 1-day API lag. If you query at midnight, you get yesterday's closed data, not today's in-progress metrics. Plan for this delay in alerts and dashboards.
  • Not segmenting by user tier or product adoption. A 0.22 ratio is healthy for a freemium product but alarming for a B2B SaaS. Always compare ratios within your own cohorts and tiers.

Wrapping Up

Your DAU/MAU ratio is the simplest pulse check for user stickiness. Pull the two metrics from Amplitude's Active Users dashboard daily, calculate the ratio, and track it over time. Create cohorts to see which user segments are sticky and which are leaking. If you want to track this 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