Import Mixpanel Data to Google Sheets

In this guide, we’ll walk through how to import Mixpanel data directly into Google Sheets, using the API Connector add-on for Sheets.


Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Access Token

  1. Log into Mixpanel and navigate to Settings > Organization Settings
  2. Now click Service Accounts > +Add Service Account
  3. You'll be prompted to select a name, roles, and expiration time for the Service account. Click Create.
  4. You'll be presented with a modal containing your username and secret. Copy these down.
  5. One last step: Because the Mixpanel API requires Basic Authentication, we need to encode our authentication info to base 64. You can do this by entering your your credentials in the format username:secret into this form (i.e. your username, then a colon, and then your secret).

    The encoding script runs in your browser, and none of your credentials are seen or stored by this site.


Part 2: Get Your Mixpanel Project ID

Most of Mixpanel's API endpoints require a project ID, so let's get that now. Click Settings > Project Settings and copy down the Project ID value.

While you're here, also note the value in the Data Residency field. If it says US, your API request URL will start with while if it says EU, it will start with

Part 3: Get Mixpanel Insights Data in Sheets

You can create a request using any of the endpoints and parameters described in Mixpanel's API documentation. For this example we'll get data from your Insights reports. For this endpoint you'll also need the report's bookmark ID, which can be found from the url: Substitute in your own encoded credentials from part 1 above.

  • Application: Custom
  • Method: GET
  • Request URL:
  • Headers
    • Authorization: Basic your_encoded_credentials


  1. If your organization's data residency is in the EU, the API request URL will start with instead of
  2. Data for Mixpanel's /insights endpoint is currently returned in one long row, with each date receiving a unique column. This is due to the structure of the underlying JSON, as each date is a unique JSON key (and unique keys correspond to unique column headers). In the future, API Connector will add an option to restructure Mixpanel's response such that dates can be sorted into rows instead of columns.

Part 4: API Documentation

Official documentation:

Leave a Comment

Jump To