Our Mixpanel integration enables you to easily sync your usage data with Planhat. In Planhat you can leverage the data in Health Scores, send proactive alerts when usage level changes and much more. Let us describe how the integration works and how you can set it up.
Summary
The integration should be set up by a Mixpanel admin
Since Mixpanel's API doesn't support real-time event flow, we pull data every 20 minutes
Mixpanel events can be linked to Planhat's Companies, End Users, Assets and/or Projects. Data linked to End Users can also be associated with Assets / Projects and aggregated up to Company level
Data is mapped to the right record using either the record's External ID in Planhat or the End User's email
If the End User doesn't already exist in Planhat, the End User can be created automatically by Planhat if the Mixpanel data includes either End User email or End User External ID and Company External ID
Mixpanel data creates User Activities or Custom Metrics (time-series data) in Planhat - it does not update fields (CRM data)
The integration will only work with paying plans in Mixpanel
Updating "Sync events from date" will pull in usage data from that date, duplicates will therefore be created if you are updating it multiple times.
Additional information about data structure expectation and flexibility
To map the events from Mixpanel, we expect the following structure:
{"event": "Viewed report", "properties": { ...}}
In the properties section, you may pass either the End User External ID (often $user_id in Mixpanel) or email for User Activities. For the $user_id to work, Planhat's End Users need a matching External ID.
Events are typically linked to User Activities, which in Planhat are logged on the End User level and can be associated with Assets or Projects. Additionally, the usage data can be aggregated up to the Company level and further to a custom set of Companies.
If an event is passed with no End User identifier, the event/metric can be saved on the Company level as a Metric, based on the Company's External Id. The same is true for Assets and Projects which are only available in some packages.
Step 1 - Get your credentials from Mixpanel
Log in to Mixpanel and go to the Project Settings page
Press Create a Project and save the API Secret and Location settings
Log in to Planhat
In Planhat:
Navigate to the App Center
Click on "+ New app" in the top right
Search for and select the Segment integration
Click "+ Add app"
Ensure the toggle switch at the top of the integration is turned on - it is "Enabled"
Paste the API secret and enter the Mixpanel data location
Step 2 - Map your Mixpanel data to Planhat
The purpose of this step is to inform Planhat how Mixpanel's identifiers should be linked to Planhat's record identifiers. In Planhat the mapping properties are standardized to be either email or External Id. In Mixpanel the properties may vary which is why this step is needed.
In the Mixpanel integration, page expand the "Data Mapping" area
Enter Mixpanel's event property names that match Planhat's External IDs (and email)
Required properties to match are Company External ID or either End User External ID or End User email. If Planhat is to create End Users based on incoming user activities, either Company External ID or End User email is required. If only End User email is provided, Planhat will assign the End User to the Company that has the same related domain as the email domain (given that related domain on the Company record is populated in Planhat).
Optional Step - Filter the usage data that you want synced
Some customers' Mixpanel environments have a lot of user events that aren't relevant for the Customer Success team. To limit noise and ensure that focus is kept on what's important, we advise that you filter the data in such cases, as described below.
Expand "User Activities", and type Mixpanel's event name followed by enter to only allow those activities to be synced
Expand "Custom Metric", and type Mixpanel's metric name followed by enter to only allow those to be synced
Step 3 - Complete set-up
Complete the set-up by scrolling down to the bottom of the screen and selecting the date you want to sync events from and pressing save