> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manalens.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to track DAU, WAU and MAU

> Measure daily, weekly and monthly active users from page views and custom events, on the Overview, on a dashboard chart, or with SQL.

Active users are the people who did something in a period: daily (DAU), weekly (WAU) or monthly (MAU). This guide shows three ways to measure them.

## What counts as active

| Term | Meaning |
| - | - |
| **Visitor** | One `anonymous_id`: one browser or one game install. See [core concepts](https://docs.manalens.dev/data/concepts.md#visitors). |
| **Person** | The `user_id`, else the one user that the `anonymous_id` links to, else the `anonymous_id`. |
| **Active** | Sent a page view or a custom event in the period. `identify` events and bots do not count. |

The Overview counts visitors. To count a signed-in user once across devices, call [`identify()`](https://docs.manalens.dev/guides/identify-users) and count people with SQL (Part 3).

## Part 1: Read it on the Overview

1. Open **Overview**.
2. Choose the range: **7D** for WAU, **30D** for MAU, or one day in the calendar for DAU.
3. Read **Visitors**: the unique visitors in the range.
4. Click **Visitors** to show it on the trend chart. The chart shows each day, so it is your DAU curve.
5. Turn on **Compare** to see the previous period of the same length.

## Part 2: Add a DAU chart to a dashboard

1. Open a dashboard and click **Add chart**.
2. Pick the **Daily visitors against a goal** example. It draws daily visitors as a line, with a goal line.
3. Change the goal to your target and click **Save Chart**.

## Part 3: Count active people with SQL

This query counts DAU by user for a game or a product. It uses `user_id` when there is one, else `anonymous_id`.

```sql theme={null}
SELECT
  toDate(original_timestamp) AS day,
  uniqExact(if(user_id != '', user_id, anonymous_id)) AS dau
FROM raw_events
WHERE type IN ('page', 'track')
  AND JSONExtractString(context, 'device') != 'bot'
  AND toDate(original_timestamp) BETWEEN {{date_from}} AND {{date_to}}
GROUP BY day
ORDER BY day
```

For WAU or MAU, group by `toStartOfWeek(original_timestamp, 1)` or `toStartOfMonth(original_timestamp)`. The `1` starts the week on Monday, as the reports do; with no second argument ClickHouse starts the week on Sunday. Run the query in the [Explorer](https://docs.manalens.dev/guides/sql-explorer.md), or save it as a Line chart with **X column** `day` and **Y column** `dau`.

> [!NOTE]
>
> This SQL key is simpler than the report rule. It does not join anonymous activity from before `identify()` to the user. So it can count a little more people than reports such as retention.

## Part 4: Go deeper

* **Stickiness:** divide DAU by MAU. A higher ratio means that people come back more often.
* **Lifecycle:** open **Users**, then **Audience insights**, to see New, Returning, At Risk, Churned and Resurrected people.
* **Games:** filter by **Build** or **Platform** in the App group to compare releases.

## Related

* [Metrics](https://docs.manalens.dev/data/metrics.md)
* [How to measure retention](https://docs.manalens.dev/guides/retention.md)
* [Audience insights](https://docs.manalens.dev/features/audience-insights.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.