Skip to main content

Documentation Index

Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

When would you use this?

  • You want to know how many customers bought today, this week, and this month - and whether that number is growing.
  • Your marketing team runs a loyalty campaign and wants to track weekly engagement lift over the following month.
  • Leadership asks “Are our regulars becoming more or less frequent?” - you need a stickiness ratio to answer that.
  • You are building a retention dashboard and need each data point to show the active user count for its own period, not a snapshot of today.

What this recipe builds

Four metrics - DAU, WAU, MAU, and a WAU/MAU stickiness ratio. Each metric uses TIME_METRIC with a different grain, so each date on the time spine shows the active customer count for its own window: a daily count for DAU, a rolling week for WAU, a rolling month for MAU. The stickiness ratio divides WAU by MAU - a high value means customers are ordering frequently, not just once a month. All four metrics are sliceable by city, truck, menu type, or any other dimension.
This recipe uses the time metrics concept. See the documentation for the full technical reference.

Prerequisites

A date entity must be marked as a time spine.
TIME_METRIC handles the join to the time spine automatically.
# Mark the date entity as a time spine
type: entity
name: date
is_time_spine: yes

Steps

1

Daily Active Users

Distinct customers per day. Each date point on the time spine shows the count for that specific day only.
TIME_METRIC(
  COUNT(DISTINCT order_header.customer_id),
  date_field => order_header.order_date,
  grain => day
)
2

Weekly Active Users

Distinct customers per calendar week. Constant within Mon–Sun, then updates at the week boundary.
TIME_METRIC(
  COUNT(DISTINCT order_header.customer_id),
  date_field => order_header.order_date,
  grain => week
)
3

Monthly Active Users

Distinct customers per calendar month. Stays constant for the whole month - the denominator for the stickiness ratio.
TIME_METRIC(
  COUNT(DISTINCT order_header.customer_id),
  date_field => order_header.order_date,
  grain => month
)
4

WAU to MAU ratio

What fraction of monthly customers also ordered this week? High values indicate frequent visitors; low values indicate mostly one-time monthly buyers.
DIV0(order_header.wau, order_header.mau)
DIV0 is Snowflake-native syntax. For other warehouses, replace with NULLIF - for example, order_header.wau / NULLIF(order_header.mau, 0).

Sample output

First week of June 2022:
DateDAUWAUMAUWAU/MAU
2022-06-0118,46997,559203,39147.97%
2022-06-0216,72097,559203,39147.97%
2022-06-0317,80697,559203,39147.97%
2022-06-0418,18797,559203,39147.97%
2022-06-0518,87297,559203,39147.97%
2022-06-0618,020100,468203,39149.40%
2022-06-0718,121100,468203,39149.40%
On June 6, a new calendar week starts - WAU jumps from 97,559 to 100,468 and the stickiness ratio updates accordingly.

Key design notes

ConcernGuidance
Time spine requiredTIME_METRIC needs an entity marked is_time_spine: yes. Without it, you cannot produce a per-period time series.
Grain argumentgrain => day / week / month controls the window each row reports on. Changing grain changes the semantics - they are not interchangeable.
Correct aggregationActive customer metrics use COUNT(DISTINCT customer_id) - each customer counts once per period regardless of how many orders they placed.
Works on any grainDAU, WAU, and MAU each reflect their own window, so the stickiness ratio remains meaningful whether you slice by day, city, or truck.