Mixpanel Data Out
UpdatedAbout this integration
Mixpanel is an analytics platform that helps you track user interactions in your websites and apps, so you can convert, engage, and retain more users.
Getting started
Go to Data & Integrations > Integrations and select the Mixpanel entry in the Directory tab.
(Optional) Select the data sources that you want to connect to your outbound integration. You can always connect data sources later. We’ll only show you data sources that work with your integration.
Configure your integration.
Project Token: Mixpanel project token.
Api Secret: Mixpanel project secret.
Api Region: Learn about EU data residency
Source Name: This value, if it's not blank, will be sent as source_name to Mixpanel for every event/page/screen call.
Strict Mode: This value, if it's 1 (recommended), Mixpanel will validate the events you are trying to send and return errors per event that failed. Learn more about the Mixpanel Import Events API
Click Enable Destination.
Actions
Before you get started with Mixpanel, you should implement the alias
method in your sources. This ensures that you attribute activity to the right users.
When you’re done setting things up, you can go to the Actions tab to see how we map incoming data to your integration.
Track Event
Default Trigger: type = “track”
Send an event to Mixpanel. Learn more about Events in Mixpanel
Identify User
Default Trigger: type = “identify”
Set the user ID for a particular device ID or update user properties. Learn more about User Profiles and Identity Management.
Group Identify User
Default Trigger: type = “group”
Updates or adds properties to a group profile. The profile is created if it does not exist. Learn more about Group Analytics.
Alias
Create an alias to a distinct id. This action is primarily supported for the sake of customers using the legacy identity management in their Mixpanel project. For new customers or those who have migrated to the new identity management in Mixpanel should use identify
.
Track Purchase
Default Trigger: type = “track”
Send an ‘Order Completed’ Event to Mixpanel.
Use simplified identity merging in Mixpanel
Before March 2023, Mixpanel required you to use the alias
method to merge identities. Now Mixpanel has a Simplified API for identity merging. This API supports identity merging the way most platforms do—without needing to send alias
calls. Learn more about Mixpanel’s simplified ID merge feature.
If you created your account before April 2024, you need to enable Mixpanel’s Simplified API to support easy identity merges. Otherwise, you’ll have to use the alias
method to merge identities.


Using the alias
method (original API)
Mixpanel’s original API doesn’t gracefully handle identity changes. For example, when you identify a person who was previously anonymous, Mixpanel’s original API doesn’t automatically associate anonymous activity with the userId
in your identify call. Instead, Mixpanel’s original API treats the anonymousId
and userId
as two separate people.
If you don’t want to enable the Simplified API, you need to send an alias
call to associate anonymous activity with an identified person (a userId
).
You should send the alias
method before you send an identify
call for a person. For example, using our JavaScript snippet, your flow might look something like this:
// the anonymous user does actions under an anonymous ID
cioanalytics.track('92734232-2342423423-973945', 'Anonymous Event')
// the anonymous user signs up and is aliased to their new user ID
cioanalytics.alias('92734232-2342423423-973945', '1234')
// the user is identified
cioanalytics.identify('1234', { 'plan': 'Free' })
// the identified user does actions
cioanalytics.track('1234', 'Identified Action')
Attributing track
events to groups
You can attribute events to groups in Mixpanel. To do this, make sure that your track
calls either include a groupId
and that it’s mapped to a valid value in your action. By default, we map this field to your source data’s context.groupId
field.