I want to create a cohort in mixpanel by uploading a csv. How do I do this?
Here's how to create a cohort in Mixpanel by uploading a CSV: [Creating a Cohort via CSV]
Step 1: Prepare Your CSV
Create a CSV file with two columns (no column headers):
One column containing the distinct_id values of the users you want in the cohort
One column containing a user property value that identifies cohort membership (e.g., inCohort == "yes")
Example structure:
user_abc123,yes
user_def456,yes
user_ghi789,yes⚠️ Do not include column headers in the CSV — you'll define them during the upload wizard in the UI.
Step 2: Upload the CSV
Go to the Users tab in Mixpanel
Click Add/Edit Profile
Select Import from CSV
Upload your file [Creating a Cohort via CSV]
Step 3: Map the Columns
In the upload wizard:
Assign $distinct_id as the property name for the column containing the distinct_id values
Choose a property name for the column containing the cohort membership value
Verify the column assignments are correct, then click Import Profiles [Bulk Import from CSV]
Step 4: Define the Cohort
Once the import is complete, use the newly uploaded user property (e.g., inCohort == "yes") to define your cohort in the Cohort Builder. [Creating a Cohort via CSV]
A few things to note:
If a $distinct_id in your CSV doesn't match an existing user, a new user profile will be created for that ID.
Cohorts created this way are static — they won't update over time since the underlying user property remains unchanged.
The maximum CSV size is 1 million rows. [Bulk Import from CSV]
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
