Import Users / Group Profiles
Mixpanel allows you to import user and group profiles via the Users page in bulk using CSV, or to individually create or update profiles.
After import, events that users or groups trigger will be visible on their profile in the "Activity Feed".
To get started, click on Add/Edit Profile.
Change Profile Type
You can upload user profiles using the $distinct_id or group profiles using the group identifier.
To change the type of profile you are importing, select the profile type you are interested in the toggle of the Select Profile Type section.
Ensure that your CSV has the right identifier when you import profiles. Use the $distinct_id for users, and the group identifier for groups.
Creating or Updating Profiles
Select a Mode
You can choose to create a profile, or to update a profile. In the create profile case, we'll warn you if you're trying to create a profile that already exists, and in the update profile case, we'll warn you if you're trying to update a profile that does not exist.
Set an Identifier Column
The most important column in your spreadsheet is the $distinct_id column for user profiles or $group_id, the group identifier, for group profiles, as these are the canonical identifiers in Mixpanel.
For more information on how $distinct_id works in Mixpanel, see:
Mixpanel will populate either $distinct_id or $group_id as a field that must be set, regardless of if you are in Create mode or Update mode.
Add Additional Properties
After $distinct_id, you can add additional properties to the profile by pressing the "Add Property" button. Mixpanel will help autocomplete profile properties that you may want to set.
Keep in mind that Mixpanel reserves a handful of user profile properties as special or reserved Properties. These properties will allow you more flexibility and functionality within the Mixpanel web application.
Other special properties include $first_name, $last_name, $username, and $phone. Ensure that if you’re adding any of these values that you enter the column headers with the dollar sign and name so that Mixpanel recognizes them as a special or reserved Property.
Note that a '+' needs to precede phone numbers. This is especially useful for international numbers.
Import Profiles From CSV
Prepare Your CSV for Upload
When editing the CSV that you want to upload as profiles, you should not include column headers (e.g., Email, Name, etc.). Instead, you’ll identify column headers during the CSV upload wizard in the Mixpanel UI.
Note:
If you upload a CSV with new information for existing contacts or companies, any existing information will be overwritten by new values you've imported.
Note:
The maximum size for your CSV is 1M rows.
Upload Your CSV
Go the the Import from CSV mode and select your prepared csv to begin the process.
Choose an Identifier Column
The most important column in your spreadsheet is the $distinct_id column for user profiles or $group_id, the group identifier, for group profiles, as these are the canonical identifiers in Mixpanel.
For more information on how $distinct_id works in Mixpanel, see:
To ensure future actions by each user is recorded on the correct user profile, make sure the value you assign for $distinct_id or group identifier on import is the same value on which you’re identifying users when they log in.
If you do not assign an identifier column, Mixpanel will use your $email column as the $distinct_id value; if you don’t have an $email column either, then the $distinct_id value will be assigned randomly by default as described above.
Choose Desired CSV Columns
You'll have the opportunity to look through all columns in the CSV to preview the values. In this step you must uncheck all of the columns you wish to NOT import. You must also choose the associated Mixpanel profile property that each CSV column will be associated with. When you done selecting the columns you wish to import along with their associated properties, press the Import profiles button.
Duplicate Profiles
If you import user profiles using $distinct_id values that already exists, those profiles will be updated with the additional user profile properties in your CSV.
Mixpanel imports based only on $distinct_id and will not deduplicate user profiles automatically based on other properties, like $email or $last_name.
If you upload user profiles that have the same email address or the same name as existing user profiles, you will be uploading duplicates - they will not be combined.
Ensure that the users you’re uploading don’t already have a user profile before you import, and if they do, ensure that the identifier column matches the existing profile’s identifier.
Selecting a profile will display the identifier in the URL as the query parameter, such as "?distinct_id".
Advanced User Profile Imports
The CSV import wizard treats every property value as a string. This means lists (such as Push Notification tokens) and numbers won't be properly imported.
For more advanced user profile imports, we recommend sending updates to the /engage endpoint instead of using the CSV import tool.
Import Profiles to Create a Cohort
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.
Comments
Article is closed for comments.