Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

  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 a user an actor (or use the default). In our example, we select selected username.

  5. Accept the default /wiki/spaces/LEXICON/pages/1302495656Show, 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 select the action event_nameselected action. The surrounding text auto automatically updates to say "Filtered to events with event_name that 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, run_query request.
    For our usage loopback table data, we consider a user to be daily active “active” if they run at least one query. This is why we filter our actor property to event_name matches run_ query request. Choose activities appropriate for your dataset.

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

    Image Added
  9. Click Go to see your actor property results.Click , 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 iconthe 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 click 1 day to open the dropdown. Type 28 and  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.

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

Construct the top-level query

...

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.

    Image Added
  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 queriescalled queries_per_user_t28d.
    Next to Split by, click the trash icon. The text now reads Split by none.

    Image Added
  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 See Calculate measures and filters for filters for information about building expressions.

      Image Added
  9. Click Go to run the query.

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