Mixpanel is a business analytics service that tracks user interactions with web/mobile applications and provides tools for targeted communication with them.
NOTE: Mixpanel is supported by a third-party ETL called StitchData. To learn more, click here.
How to Connect
Before connecting please collect your Mixpanel Token, API Key, and API Secret.
- Click on the Data tab at the top left of the global navigation. Then click on "Connections" in the Data Library section.
- Click on the blue "Connect" button and search for Mixpanel.
- Click on the Mixpanel logo.
- 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.
- 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:
- Click your name in the upper righthand corner of your Mixpanel project.
- Select Account from the dropdown
- Click Projects.
- Your Token, API Key and API Secret should all be visible.
- Copy these three values and paste each into the respective field in Grow.
- When you have entered all of the information in, press the blue Submit button.
And that’s it. You are good to go!
- 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. You can find more info here.
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.
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.
If you want to use the Mixpanel report “Event Data Segmented," you’ll need to create an expression to segment on.
Mixpanel has an article here about how to build segmentation expressions. Because they use their own syntax, you’ll need to read through the article to know how to build a segmentation expression that works with Mixpanel’s API.
Once you have found all the pieces of the filter (segmentation) expression, you will enter this into the field labeled “Where Expression.” (This seems counter-intuitive, as there is a field for “Segment On,” but the expression does goes into the “Where Expression” field.)
After you enter the segmentation expression, fill in the rest of the data and connect the metric.