Cohorts
Overview
Cohorts are groups of users that share a certain set of properties or who perform a similar sequence of events. Mixpanel lets you visually define cohorts, view the list of users that comprise them, compare them in your analysis, and share them with the rest of your company.
Here are some examples of cohorts you can create in Mixpanel:
- US Users: Users who are from the US
- New Users: Users who signed up in the past month
- Power Users: Users who used your app on 5 out of the last 7 days
- Dropped-Off Users: Users who signed up, but did not come back the following week
Creating Cohorts
You can create cohorts via any of our report visualizations or explicitly using the cohort builder.
Creating a Cohort via a Report
Click any bar or point in an Insights, Funnels, or Retention report and select "View Users". The side panel will show the list of users that belong to that bar or point you selected. You can save that group of users as a cohort.
Creating a Cohort via the Users page
The Cohort Builder in the Users page lets you define cohorts based on a precise set of conditions. These conditions are either of the form "Users who did <event>
more/less than <some threshold>
" or "Users where <profile property>
is equal to/more/less than <value>
".
Let's walk through some of cohorts you can create with the builder.
Filter by users who watched more than 10 videos in the last 7 days
Filter to only users who watched a video for the very first time in the past 30 days
Filter to users that watched more than 300 mins of video in the previous 30 days
Filter to users whose average video watch time was over 15 minutes in the previous 30 days
Filter to users that purchased items in 3 unique categories in the last 30 days
Filter to users that watched a video on at least 3 unique days in the previous 30 days
Filter to users that made a purchase on 4 or more unique weeks in the last 3 months
Filter to users that are above the age of 60
Chaining cohorts together using the AND/OR operators
You can also access the builder directly from the property picker in any of our reports, by clicking Create Custom > Cohort. This will create a temporary cohort that only persists for your analysis session.
Multiple Cohort Definitions
Click the "+ group" in the bottom left corner of the cohort builder to add additional definitions to your cohorts. Each group contains a separate cohort definition, and you may toggle between using the AND/OR operator to combine your definitions.
<SCREENTSHOT_FOR_ADDING_GROUP_AND_OPERATORS>
Cohorts definitions with user profile properties
Because user profile properties only store the most recent value, cohorts involving user profile properties will use the current value for those properties (even if the value changed over time).
For example, suppose the cohort’s filter criteria is: users where user[“City”] == “SF” and “Did Event: Order Ride 3 times in Last 7 days”.
Mixpanel computes the above over the last 30 days and then groups the set of users who have property user[“City”] == “SF” as of right now and intersect that with the daily cohort of users who did Order Ride 3 times in the last 7 days.
Cohort definitions with a long list of unique values
If you have a specific list of users that you want to include in a cohort definition, it is not recommended to manually define them by their unique property values (list of 10K emails, user IDs, etc.). Parsing lists of values may affect your query performance and lead to some queries failing. As a best practice, you should add a profile property that identifies these users cohort membership, and then build a cohort definition using that profile property instead.
To upload a group of user (or group) profiles and easily sort them into a cohort, add a value to the CSV which sorts the profiles into a cohort as a property. For example, give each profile the unique property of "Cohort = Android Users". Next, go to the Cohorts tab to create a cohort as usual, and filter to user profiles with that property and save. This will create a cohort of users with that matching property.
Note that when creating cohorts this way, the cohort will remain static, meaning that it will not update over time like other cohorts as the property is unchanging.
Using Cohorts in Analysis
You can visualize how cohorts size over time, use cohorts to filter your reports, or compare how cohorts perform a metric.
Visualizing Cohort Size Over Time
In Insights, you can define a metric based on the size of a cohort over time. This is useful to understand how key subsets of your user base (like your Power Users) are trending over time. Select a cohort from the "Events and Cohorts" menu in the Insights report; this will generate a line chart that shows the size of the cohort over time. Each point is the size of the cohort as of the end of that time interval.
Note that cohort definitions that only contain user profile properties will appear static.
Filtering by a Cohort
You can use cohorts to filter any of your analysis by selecting a cohort from the filter menu. For example, if you're focused on Onboarding, you can filter all your analyses to the New Users cohort, which might be defined as users who signed up in the past 7 days.
Comparing Cohorts
You can compare the behavior of different cohorts by selecting a cohort from the breakdown menu. For example, you can use this to see how engagement compares for Power Users vs All Users.
How Cohorts are Computed
Cohorts are computed dynamically at the time that you use them in a query. Suppose you make a funnels report that filters down to the New Users cohort. Under the hood, Mixpanel does the following:
- Run a query to compute the set of users who are in the cohort as of right now (the time that the query is run).
- Run a query to compute the set of users who converted in the funnel, filtering down to the list produced in Step 1.
This has a few implications. First, it means every time you run a query that uses the cohort, the cohort is freshly computed vs being a static snapshot of users. Second, it means that the set of users who are in the cohort are users that are in the cohort as of right now; it's not a rolling window of users that have ever been in the cohort.
Cohorts and Time
We don't recommend using Cohorts in analysis when trying to understand cause -> effect relationships between user behavior. For example, suppose you're trying to understand whether watching more comedy videos drives users to subscribe. You might create a Comedy Fans cohort defined as "Users who performed Watched Video where genre=comedy in the last 30 days" and then breakdown your Subscriptions by whether users are in the Comedy Fans cohort. The problem is that the user might have become a Comedy Fan after subscribing, which doesn't tell you whether watching comedy had any impact on subscribing.
Instead, we recommend using Funnels if you want to understand specific sequences of events with a strict ordering between each other. For example, creating a funnel from Signup -> Subscription and comparing that to a funnel from Signup -> Watched Comedy -> Subscription, to understand what % of users convert after watching comedy.
Saving and Sharing Cohorts
Cohorts that you create are, by default, only visible to you. You can optionally share cohorts with specific other people or with your organization. This makes Cohorts that you create discoverable by others.
We recommend sharing a set of key cohorts with your organization, to ensure that you align on key definitions of user behavior that are important for your business (eg: New Users, Power Users). We also recommend adding descriptions to such cohorts, to share context with your team.
Exporting Cohorts
You can download the list of users in any Cohort as a CSV via the Cohort Builder. You can also push cohorts to 3rd-party destinations like Segment, Braze, or a Custom Webhook.
Learn more about cohort syncs.
Was this page useful?