Export People Profiles to CSV

People profiles cannot be exported via the Mixpanel UI. You can export your people profiles by either:

    1. A JQL Query in Mixpanel.
    2. A Python script.

Export People Profiles with JQL

Note that exports using JQL are limited to 2GB, so if you run into issues exporting, try the steps below for the Python script instead, which can handle any size export.

In your Mixpanel project, click on Applications > JQL > Build your own, and remove any pre-populated code that appears.

Then, enter the following query > RUN QUERY, then Export to CSV*:

function main() {
  return People()
}

Learn more about the power of JQL.

*Limited by plan type

The ability to export to CSV is available only to customers on an Enterprise plan - visit the pricing page for more information or to upgrade.

 

Export People Profiles with a Python Script

People profiles can be exported through the Mixpanel API. One way to request and execute the export is through a simple Python script. Use the the Mixpanel_api repository and reference the export section to find the necessary functions. In order to obtain all of the necessary components of the script: 

1. Collect your API credentials under Account > Account Information > Projects

Screenshot_2018-04-30_14.43.25.png

Screenshot_2018-04-30_14.45.03.png

2. If you are exporting all of your users, you can ignore Selector and Behaviors. However, if you want to export a subset of users, you'll want grab these two parameters. In order to do this:

  • Go to the "Explore" tab and select the subset of users you would like to export using people properties and/or events.
  • Open Developer Tools and bring focus to the console (On Chrome for Mac: command + option + "J" & on Chrome Windows: control + shift + "J").
  • Refresh the page.
  • From the console, select the Network tab, select XHR, find the "engage" selector in the "Name" column, and then select Headers. 

2016-03-23_02_30_14.383562-selectorbehaviorsfinal2.png

  • Find the 'selector' and 'behaviors' values underneath the 'Query String Parameters'. 
  • Copy and paste the 'selector' and 'behaviors' values into the script. the script under 'selector'. 
  • If you do not have a behaviors parameter you can leave this value blank (as is). Finally, save the document:

2016-03-23_01_42_34.621762-selectorbehaviors.png

3. Execute the script to pull these people profiles into a new JSON file. If you would like this in CSV format, you will want to add the parameter "format = 'CSV'". On a PC, simply open up the script with Python 2.7 to execute it. On a Mac, open up your Terminal and follow the steps below:

2015-04-20_18_51_53.586496-People2CSV_05.png

That's it! The exported file will now be in the same location as the python script, and will include the epoch time stamp for when the export was performed.

We Can Help

The Mixpanel support team is available to answer questions about the export process including questions about JQL. You can reach Mixpanel support through our webform or via email at support@mixpanel.com.
Is this article helpful?
2 out of 17 found this helpful

Comments

0 comments

Article is closed for comments.