Skip to main content
Skip table of contents

Calculate DAU and MAU

One way to evaluate your app’s “stickiness” is to compare its daily active users (DAU) and monthly active users (MAU). 

The ratio of DAU/MAU represents your average daily active user count / monthly active user count. The closer your ratio is to 1, the more often users are using your app, rather than logging in only sporadically. 

This article demonstrates the following:

  1. How to build custom actor properties for daily active users and monthly active users.

  2. How to analyze the actor properties in Explore.

This article uses the Scuba loopback usage data set.

Build the custom actor properties

To analyze DAU/MAU, create two custom actor properties:

  • One that measures daily activity

  • One that measure monthly activity

Define daily activity and monthly activity using the same criteria except for the trailing time window.

You can create an actor property in one of two ways:

  • To create an actor property that you want to save, reuse, and potentially share with other users, follow all of the instructions below.

  • To create an actor property that you can use only with a single top-level query, define the property in the query palette (see Create a property in Explore with the query palette) when you define the top-level query. You will still follow steps 4-9 below.

To build a Daily Activity actor property, do the following: 
  1. In the left menu bar, click Data, then click the Actor Properties tab.

  2. In the top right corner of the window, click +New Actor Property.

  3. At the top of the page, enter a name for the property. We named our property queries_per_user_t1d (instead of something like Daily Activity) to help someone looking at this query later quickly see what criteria we are using to measure daily activity (see step 7).

  4. In the left definition pane, select an actor (or use the default). In our example, we selected username.

  5. Accept the default methodShow, and the default aggregation, count of events.

  6. At Filtered to, click all events. From the dropdown, select the event property or combination of event properties that define a user action. In our example we selected action. The surrounding text automatically updates to say "Filtered to events with action that matches ..."

  7. In the new dropdown, select the actions you want to filter to, adding additional actions with the plus sign. Select the filtered to actions for the property. Click the plus sign to choose multiple actions. For our example, we chose only one action, query request.
    For our usage loopback table data, we consider a user to be “active” if they run at least one query. This is why we filter our actor property to event_name matches query request. Choose activities appropriate for your dataset.

  8. Click + time options and accept the default of “Trailing window: trailing 1 day”. See Specify time in a query for more information about trailing windows.

  9. Click Go to see your actor property results, then click Save.

To build a Monthly Activity actor property, do the following: 
  1. At the top of the daily activity actor property data model page, click the duplicate icon. This creates a copy of the daily activity actor property definition and is especially helpful if you have defined activity using complicated criteria.

  2. At the top of the page, enter a name for the property. We named our property queries_per_user_t28d (instead of something like Monthly Activity) to help someone looking at this query later quickly see the criteria (queries per user) and time range (28 days) we're using to define monthly activity.

  3. If you duplicated the daily activity actor property, you can accept the settings at Method, Show, and Filtered to. These correspond to steps 4-7 above.

  4. Click + time options.

  5. Next to Trailing, click 1 day to open the dropdown. Type 28 and select 28 days. See Specify time in a query for more information about trailing windows. In our example we use 28 days instead of 1 month, because 28 days has a consistent number of weekend and weekday days, regardless of starting date.

  6. Click Go to see your monthly activity actor property results, then click Save.

Construct the top-level query

To compare DAU and MAU, build a query in Explore. For example, your end goal might be something like this:

To create a query with DAU and MAU on the same chart:

  1. Navigate to the daily activity actor property (called queries_per_user_t1d in our example).

  2. From the daily activity actor property, click Explore at the top left.

  3. Click measure 1 and edit the name to DAU.

  4. Under Filtered to, click all username actors (or whatever your actor field is named) and select your daily activity actor property from the dropdown. For our example (where our daily activity property is named queries_per_user_t1d), the text automatically updates to read Filtered to username actors with queries_per_user_t1d that is greater than 0. Change the minimum criteria to suit your analysis needs.

  5. Click +measure to start creating the MAU definition.

  6. Click measure 2 and edit the name to MAU.

  7. Repeat the selections from the DAU measure above, substituting your monthly activity actor property in place of your daily activity actor property. In our example, our monthly activity actor property is called queries_per_user_t28d.

  8. Optional: To calculate DAU/MAU:

    1. Click +measure to add a measure 3. Name it DAU/MAU.

    2. Click count and type an equals sign.

    3. Click a left bracket [ to see a list of the measures defined above.

    4. Enter DAU and MAU separated by a slash. See Calculate measures and filters for information about building expressions.

  9. Click Go to run the query.

  10. Click Pin at the top right to pin the query to a board for future use.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.