I want to find the average number of unique days a specific group of users (a saved cohort) viewed a particular widget (filtered by widget_id) within a given time period (e.g., last 30 days). For example: I have a cohort of 50 users. I want to know — on average, how many unique days did each user in this cohort trigger the event Viewed Widget where widget_id = 5443? So if User A viewed it on 3 days and User B viewed it on 5 days, the answer should be 4 avg unique days. I tried:
Frequency Distribution in Insights — doesn't give unique days
Frequency per User → Average — gives event count not unique days
Aggregate Property — doesn't have a date-based unique count
Hi Harsh S., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
You’re right that the out‑of‑the‑box “Frequency per User” and “Aggregate Property” measurements don’t directly give “unique days per user” for an event. The knowledge I have doesn’t show a built‑in “unique days active per user” metric in Insights, only:
Frequency per User → counts events per user (not unique days). [Measurements]
Aggregate Property / Aggregate Property per User → work on numeric properties, not on date bucketing. [Aggregate Property; Aggregate Property per User]
Because of that, I don’t see a documented point‑and‑click way in Insights to get:
Average number of unique days per user that Viewed Widget with widget_id = 5443 occurred.
The closest documented options are:
Frequency Retention report – this buckets users by how many unique time buckets (hours/days) they were active, but it’s framed as a retention/frequency matrix, not a single “average unique days” number, and is tied to a “first did event” cohort rather than an arbitrary saved cohort. [Frequency View]
Custom JQL with groupByUser – JQL lets you compute per‑user metrics over events in code. groupByUser guarantees you process all events for each user and can compute arbitrary per‑user aggregates. [groupByUser]
With JQL you could:
Filter to your time range (e.g. last 30 days).
Filter to event = "Viewed Widget" and widget_id = 5443.
Use groupByUser to:
Build a set of calendar dates each user fired the event.
Count the size of that set (unique days per user).
Then compute the average of that count across users.
However, the exact JQL code for this is not shown in the docs I have; I only have examples of groupByUser usage patterns, not this specific “unique days per user” calculation. [groupByUser]
So, based on the available documentation:
There is no documented one‑click configuration in Insights that directly returns “average unique days per user” for a saved cohort and a specific event/property filter.
The documented path that can express this calculation is JQL using groupByUser, but I don’t have an official snippet to paste for your exact query.
If you’d like to pursue the JQL route, I’d recommend:
Start from the groupByUser examples in the JQL docs. [groupByUser]
Adapt the reducer to:
Normalize event.time to a date string (e.g. YYYY-MM-DD).
Track a map/set of dates per user.
At the end, emit the count of unique dates per user.
Export those per‑user values and compute the average (e.g. in a spreadsheet) if you don’t want to add another JQL pass.
Because my sources don’t show a way to plug a saved cohort directly into JQL or Insights for this exact metric, I can’t confidently describe that part; you may need to align your JQL filters with the same conditions that define your cohort, or export the cohort’s user IDs and use them in JQL.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Let me check the knowledge base for you again. One moment! 📚
Short answer: based on the docs I have, the Retention → Frequency report gets you very close conceptually (it measures “unique days in a week/month” etc.), but it is not documented as a way to:
restrict to an arbitrary saved cohort, and
then output a single “average unique days per user” number for that cohort.
So I can’t confirm a fully native, point‑and‑click way to get exactly “avg unique days per user for event + property filter + cohort” from the available documentation.
What Frequency Retention actually does
Frequency Retention:
Buckets users by how many unique time buckets they were active:
unique hours in a day
unique days in a week
unique days in a month [Frequency View]
Lets you choose Cumulative (“at least X unique intervals”) or Non‑cumulative (“exactly X unique intervals”). [Frequency View]
So conceptually, if you:
Use Retention → Frequency.
Set the event to your Viewed Widget event.
Filter by widget_id = 5443.
Choose an interval such that the “unique intervals” correspond to unique days (e.g. “unique days in a week” or “unique days in a month”). [Frequency View]
…you will see, for each cohort of “users who did the event in week X”, how many of them did it on 1, 2, 3, … unique days that week.
However, the docs don’t show:
A way to plug in a saved cohort as the population for Frequency Retention.
A built‑in “average” over those frequency buckets (e.g. turn the distribution into a single “4.1 unique days per user” metric).
Because of that, I cannot give a precise, documented step‑by‑step that ends with “and here is the average unique days per user for your saved cohort”.
Is there a “correct native way” documented?
From the docs I have:
Insights measurements:
“Frequency per User” → counts events per user, not unique days. [Measurements]
“Aggregate Property / Aggregate Property per User” → work on numeric properties, not on “unique days” as a time bucket. [Aggregate Property; Aggregate Property per User]
Computed / Behavioral properties:
“Frequency per User” and “Aggregate Property per User” again operate on event counts or numeric properties, not “unique days active”. [Computed Properties]
None of these are documented as “unique days per user” metrics.
Given that:
I don’t see a documented native metric that is exactly “avg unique days per user” for:
a specific event,
with a property filter,
restricted to a saved cohort.
I can’t confirm that Retention → Frequency plus some UI option will output that exact number.
What is documented as flexible enough
The only documented mechanism flexible enough to compute arbitrary per‑user metrics is JQL with groupByUser, which lets you:
Group events by user,
Inspect their timestamps,
Build a set of unique dates per user,
Then aggregate those per‑user values. [groupByUser]
But the docs I have don’t show:
How to directly plug a saved cohort into JQL, or
A ready‑made snippet for “unique days per user”.
So I can only say: JQL is the documented path that can express this calculation, but I can’t provide an official, copy‑paste‑ready solution from the sources.
-------------------------
Because of these documentation limits, I can’t honestly say “yes, Retention → Frequency is the correct native way and here is the exact setup” nor “here is the official native recipe for avg unique days per user for event + property + cohort.” If you need this metric strictly within the UI, you may need to approximate it via Frequency Retention distributions, or compute it exactly via JQL and then post‑process the results.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Let me check the knowledge base for you again. One moment! 📚
