Mixpanel

Certain information in this article may be missing or out of date. We are in the process of updating the content.

Mixpanel is a business analytics service that tracks user interactions with web/mobile applications and provides tools for targeted communication with them.

Connecting to Mixpanel

Before connecting please collect your Mixpanel Token, API Key, and API Secret.

  1. Click on the Data tab at the top left of the global navigation. Then click on Connections in the Data Library section.
  2. Click on the blue Connect button and search for Mixpanel.
  3. Click on the Mixpanel logo.
  4. You will need your Mixpanel Token, API Key and API Secret to connect your account to Grow. Additionally you will need a connection nickname but you get to pick that.
  5. You can find all of your API credentials by clicking your name at the top right of the UI > Account > Projects. There, you'll find your token, API secret and API key:
    1. Click your name in the upper righthand corner of your Mixpanel project.
    2. Select Account from the dropdown.
    3. Click Projects.
    4. Your Token, API Key and API Secret should all be visible.

  1. Copy these three values and paste each into the respective field in Grow.
  2. When you have entered all of the information in, press the blue Submit button.

Endpoints

Mixpanel uses JavaScript Query language to pull specific user event data. In Grow, this process has been simplified for users not familiar with JavaScript. Data can be pulled in and filtered by the desired properties or events and grouped by unit of time (hour, day, week, etc.) through the Grow edit metric screen for each of the following report types:

  • Get Data for Event(s): A count of events during each unit of time and number of total time intervals. Data Fields include Date, Time, DateTime, and (Event) Count.
  • Top Events for Today: Returns a list of the most commonly occurring events for the current day. You'll be asked to set both the count type and a limit for the number of events listed.
  • People Data: All distinct visitor usage data, including distinct id, name, last seen date, device information, country, region, timezone, etc.
  • Common Events: Last 31 Days: Returns a single-column list of the most commonly occurring events over the past 31 days.
  • Single Event and Property: Returns count values for a specific event, filtered by one event property and value. You'll also specify the type of count, unit of time, and number of time intervals to pull data for.
  • Top Property Names for Event: Returns a single-column list of the most common properties within a single event.
  • Top Values for a Property: Returns a single-column list of the most common values for a single event and event property.
  • Event Data Segmented: Returns single-event data segmented on and filtered by additional desired custom properties. You'll also specify the type of count, unit of time, and maximum number of events to return.
  • Retention: Returns counts of repeat usage for the specified date range and retention event (account birth, by default). You'll also specify
    • Which event constitutes a user's "birth".
    • What expression to filter on.
    • Which unit of time to group by.
    • The number of time intervals to return.
    • Which property to segment on.
    • The maximum number of events to return.

FAQs + Tips and Tricks

Why does Grow need the project token anyway?

Mixpanel users can have multiple projects. Each project has its own unique routing number, which is called a project token. Whenever you want to pull data from a specific project, you'll need to specify the project token.

What is the difference between the token, key and secret in Mixpanel?

This Mixpanel article explains the difference between the the token, key, and secret.

Custom Events

In Grow, you will connect to Mixpanel and open up a new custom metric. The report that you want to select is Get Data for Event(s).

The next step is to get the stored name of each custom event you want to pull data for. Mixpanel has an article here on how to find the object event in your browser console.

Follow those instructions to get the event name.

Once you find it, you can enter the name in the format of $custom_event:(6-digit number) into Grow (i.e. $custom_event:123456). You can add multiple events in the Events field, separating each one by a semicolon.

Fill in the rest of the information, then connect the metric.

Segmentation

If you want to use the Mixpanel report Event Data Segmented, you will need to create an expression to segment on.

Mixpanel has an article here on segmentation expressions. Because they use their own syntax, you will need to read through the article to know how to build a segmentation expression that works with the API of Mixpanel.

Once you have found all the pieces of the filter (segmentation) expression, you will enter this into the field labeled Where Expression.

After you enter the segmentation expression, fill in the rest of the data and connect the metric.

Was this article helpful?