How to Create Cohort In Mixpanel
Cohorts are one of Mixpanel's most powerful features for understanding user behavior and driving data-driven decisions. By grouping users based on shared characteristics or behaviors, cohorts enable you to analyze specific segments of your user base and uncover valuable insights that might otherwise remain hidden in aggregate data.
What Are Mixpanel Cohorts?
Cohorts are groups of users that share a certain set of properties or who perform a similar sequence of events. Unlike broader segments that simply group users by a single property, cohorts are more specific because they combine both events and time periods to create precise user groups.
For example, while a segment might include all users who completed onboarding, a cohort would be more specific: "users who completed onboarding between January 1-7, 2025." This time-bound nature makes cohorts static – once the time period ends, no new users can join that specific cohort, ensuring consistent analysis over time.
Common Types of Cohorts You Can Create
Mixpanel allows you to create various types of cohorts based on different criteria:
Behavioral Cohorts:
Power Users: Users who logged in 5 or more times in the last 7 days
Feature Adopters: Users who used a specific feature for the first time this month
Dropped-Off Users: Users who signed up but haven't returned in the past week
Demographic Cohorts:
Geographic: Users from specific countries or regions
Device-based: iOS vs Android users
Plan-based: Free tier vs premium subscribers
Time-based Cohorts:
New Users: Users who signed up in the past 30 days
Seasonal Users: Users who were active during a specific campaign period
Anniversary Users: Users who joined exactly one year ago
Method 1: Creating Cohorts from Report Visualizations
The quickest way to create a cohort is directly from any Mixpanel report visualization.
Step-by-Step Process:
Navigate to Any Report
: Start with an Insights, Funnels, or Retention report
Analyze Your Data
: Build your report with the metrics and filters you want
Select Data Points
: Click any bar or point in an Insights, Funnels, or Retention report and select "View Users"
Review Users
: The side panel will show the list of users that belong to that bar or point you selected
Save as Cohort
: You can save that group of users as a cohort
This method is particularly useful when you've discovered an interesting pattern in your data and want to save that specific group of users for further analysis.
Method 2: Using the Cohort Builder
For more precise control over your cohort definitions, use the dedicated Cohort Builder.
Accessing the Cohort Builder:
Go to
Data Management
in the top navigation
Select
Cohorts
Click
+ Create Cohort
Setting Up Cohort Conditions:
The Cohort Builder 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>".
Examples of Cohort Filters:
Event-based
: "Users who watched more than 10 videos in the last 7 days"
Property-based
: "Users where City equals 'San Francisco'"
First-time behavior
: "Users who watched a video for the very first time in the past 30 days"
Complex combinations
: Using AND/OR operators to chain multiple conditions
Advanced Filtering Options:
You can create sophisticated cohorts by combining multiple criteria. For instance, you might want users who both completed a specific action AND have a particular user property. The builder supports complex logic with AND/OR operators to create precisely targeted user groups.
Method 3: Creating Cohorts via CSV Upload
When you need to create cohorts based on external data or specific user lists, CSV upload is the most efficient method.
Preparing Your CSV:
You can create a Cohort by uploading a CSV. This method is useful when grouping Mixpanel users who cannot be easily identified through specific behaviors or user properties. (e.g. when you have a list of distinct_ids to include in a Cohort and they were randomly selected)
CSV Structure Requirements:
Two columns: one with distinct_id values, another with a cohort identifier
No column headers in the CSV file
Example: Column 1 contains user IDs, Column 2 contains "inCohort = yes"
Upload Process:
Prepare CSV
: Create your file with distinct_id and cohort property columns
Access Upload Feature
: Go to Users tab, click Add/Edit Profile, select Import from CSV
Define Properties
: Assign "$distinct_id" as the property name for the column containing the distinct_id values, and choose a property name for the column containing the user property value
Import Data
: Click Import Profiles to process the file
Create Cohort
: Use the newly uploaded user property to define your cohort
Important Note: Cohorts created using this method are static; they will not update over time, as the associated user property remains unchanged
Working with User Properties and Historical Data
Understanding Property Limitations:
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, if you create a cohort for users in San Francisco who ordered rides, Mixpanel will use each user's current city value, not their historical location data.
Using Historical Properties:
With historical user or group properties, you can optionally Add Time and Measurement to specify the time-range over which to search for the property value. This feature allows you to create more accurate cohorts based on historical data rather than just current property values.
How Cohorts Are Computed
Understanding how Mixpanel processes cohorts is crucial for accurate analysis:
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 dynamic computation means:
Cohorts are freshly calculated each time you use them
The user list reflects current cohort membership, not historical snapshots
Users may enter or leave cohorts as their behavior changes (except for static CSV-based cohorts)
Using Cohorts in Analysis
Once created, cohorts become powerful tools for analysis:
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.
Filtering Reports by Cohorts: 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 Cohort Performance: 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.
Best Practices for Cohort Management
Sharing and Organization: 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.
Documentation: 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 and Integration: 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.
Troubleshooting Common Issues
Identity Matching Problems: If your CSV upload creates new accounts instead of matching existing users, ensure your distinct_id values exactly match those used in your events. The value needs to match the distinct_id property's value (or the value for the Group Key's Group ID) that you're sending on your events.
Using Alternative Identifiers: In Mixpanel's Simplified ID Merge system, the $user_id property is used to identify authenticated users, while $device_id is used for anonymous users. When both properties are present on an event, Mixpanel automatically merges the identities.
Conclusion
Mixpanel cohorts are essential for understanding user behavior patterns and making data-driven product decisions. Whether you're analyzing user retention, comparing feature adoption across different user groups, or identifying high-value customer segments, cohorts provide the precision and flexibility needed for meaningful analysis.
By mastering the three creation methods – report visualizations, cohort builder, and CSV upload – you can efficiently organize your users into actionable groups. Remember to leverage cohort sharing and documentation features to ensure your entire team benefits from these valuable user insights.
Start with simple behavioral cohorts like "active users" or "new signups," then gradually build more sophisticated combinations as you become comfortable with the platform. The key is to align your cohort definitions with your business objectives and use them consistently across your analysis workflows.