Setup Guide

Set up and configure Mixpanel as a destination in RudderStack.

This guide will help you set up Mixpanel as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to Mixpanel.

Connection compatibility

Destination info
  • Status: Generally Available
  • Supported sources: Android, iOS , Web, Unity, AMP , Cloud, Warehouse, React Native , Flutter, Cordova, Shopify
  • Refer to it as MP in the Integrations object.

Connection modes
SourceCloud modeDevice modeHybrid mode
AMPsupportednot supportednot supported
Androidsupportednot supportednot supported
Cloudsupportednot supportednot supported
Cordovasupportednot supportednot supported
Fluttersupportednot supportednot supported
iOSsupportednot supportednot supported
React Nativesupportednot supportednot supported
Shopifysupportednot supportednot supported
Unitysupportednot supportednot supported
Warehousesupportednot supportednot supported
Websupportedsupportednot supported
Supported message types
SourceIdentifyPageTrackScreenGroupAlias
Cloud mode
Supported sourcessupportedsupportedsupportedsupportedsupportedsupported
Device mode
Websupportedsupportedsupportednot supportedsupportedsupported
info

Note that for the web device mode integration, that is, when using JavaScript SDK as a source, RudderStack loads the Mixpanel native SDK from the https://cdn.mxpnl.com/ domain.

Based on your website’s content security policy, you might need to allowlist this domain to load the Mixpanel SDK successfully.

Setup

Once you have confirmed that your source platform supports sending events to Mixpanel, follow these steps:

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select Mixpanel.
  2. Assign a name to the destination and click Continue.

Connection settings

SettingDescription
Project TokenYour Mixpanel Project Token.
Data ResidencySelect the relevant option among US and EU. RudderStack will send your event data to the Mixpanel server in that region.
Identity MergeSelect either Original ID Merge or Simplified ID Merge from the dropdown to track user journeys across devices. See the Mixpanel documentation for more information on the differences between these APIs.

If you select the Simplified ID Merge option, make sure to turn on the Simplified ID Merge API for your project before sending the events.

Configuration settings

Configure the below settings depending on your specified connection mode to receive the data correctly in Mixpanel.

Cloud mode

Page settings
SettingDescription
Use Custom Page Event NameToggle on this setting and specify the template for your page event names. RudderStack sets the event names for your page calls accordingly.

For example, if you set the template as Viewed {{category}} {{name}} page and send the below page event payload:

{
“type”: “page”,
“name”: “Home”,
“properties”: {
“category”: “Integration”
}
}
Then, RudderStack sends the page event name as Viewed Integration Home Page to Mixpanel.

Note that:

  • This setting is applicable for cloud mode and device mode.
  • You can skip the page category, name, or both while setting the template. For example, Viewed {{category}} page, Viewed {{name}} page, Viewed a page are all valid.
  • If you include the page category in the template, make sure to send it in the event’s properties object.
Screen settings
SettingDescription
Use Custom Screen Event NameToggle on this setting and specify the template for your screen event names. RudderStack sets the event names for your screen calls accordingly.

For example, if you set the template as Viewed {{category}} {{name}} screen and send the below screen event payload:

{
“type”: “page”,
“name”: “Home”,
“properties”: {
“category”: “Integration”
}
}
Then, RudderStack sends the screen event name as Viewed Integration Home Page to Mixpanel.

Note that:

  • This setting is applicable for cloud mode only.
  • You can skip the screen category, name, or both while setting the template. For example, Viewed {{category}} screen, Viewed {{name}} screen, and Viewed a screen are all valid.
  • If you include the screen category in the template, make sure to send it in the event’s properties object.
Mixpanel configuration settings
SettingDescription
Strict ModeIf turned on, Mixpanel validates the requests and returns errors for each failed event. See Mixpanel Import Events API for more information.
Properties to increment in PeopleSee Incrementing properties in Mixpanel People for more information.
Event mapping settings
SettingDescription
Use New MappingThis option is turned off by default. However, RudderStack recommends turning it on as support for the current (old) mapping will be deprecated soon.

When turned off, RudderStack sends the first name and last name to Mixpanel as:
$firstName: “John”
$lastName: “Keener”

If you toggle on this option, RudderStack maps these fields to Mixpanel as:
$first_name : “John”
$last_name : “Keener”

Note: RudderStack lets you pass empty and null values for the properties sent to Mixpanel.
Group key settings
SettingDescription
Group Key SettingsRudderStack sends the group calls to Mixpanel only if one or more group keys are specified here. These group keys act as the group identifiers in Mixpanel. For more information, see Group Key.
User deletion settings
SettingDescription
User DeletionSelect the deletion API from the following options which RudderStack uses to delete the user profile in Mixpanel.

  • Delete Profile: RudderStack deletes the user profile in Mixpanel but not the event data associated with it. For more information, see the Mixpanel documentation.
  • Delete Profile and Associated Events: RudderStack deletes the user profile along with the associated data in Mixpanel. Note that it can take up to 60 days for the deletion to come into effect. For more information, see the Mixpanel documentation.
  • GDPR API Token: If you select Delete Profile and Associated Events for user deletion, enter the GDPR OAuth token. For more information on generating this token, see the Mixpanel documentation.
SettingDescription
Consent management providerConfigure the consent management settings for the specified source by choosing the consent management provider from the dropdown.

Note: If you choose Custom, make sure to pass the custom consent data to SDK.
Other settings
SettingDescription
Client-side Events FilteringFilter events before sending them to Mixpanel. See the Client-side Event Filtering guide for more information.

Web device mode

Page settings
SettingDescription
Use Custom Page Event NameToggle on this setting and specify the template for your page event names. RudderStack sets the event names for your page calls accordingly.

For example, if you set the template as Viewed {{category}} {{name}} page and send the below page event payload:

{
“type”: “page”,
“name”: “Home”,
“properties”: {
“category”: “Integration”
}
}
Then, RudderStack sends the page event name as Viewed Integration Home Page to Mixpanel.

Note that:

  • This setting is applicable for cloud mode and device mode.
  • You can skip the page category, name, or both while setting the template. For example, Viewed {{category}} page, Viewed {{name}} page, Viewed a page are all valid.
  • If you include the page category in the template, make sure to send it in the event’s properties object.
Screen settings
SettingDescription
Use Custom Screen Event NameToggle on this setting and specify the template for your screen event names. RudderStack sets the event names for your screen calls accordingly.

For example, if you set the template as Viewed {{category}} {{name}} screen and send the below screen event payload:

{
“type”: “page”,
“name”: “Home”,
“properties”: {
“category”: “Integration”
}
}
Then, RudderStack sends the screen event name as Viewed Integration Home Page to Mixpanel.

Note that:

  • This setting is applicable for cloud mode only.
  • You can skip the screen category, name, or both while setting the template. For example, Viewed {{category}} screen, Viewed {{name}} screen, and Viewed a screen are all valid.
  • If you include the screen category in the template, make sure to send it in the event’s properties object.
Mixpanel configuration settings
SettingDescription
Properties to increment in PeopleSee Incrementing properties in Mixpanel People for more information.
Group key settings
SettingDescription
Group Key SettingsRudderStack sends the group calls to Mixpanel only if one or more group keys are specified here. These group keys act as the group identifiers in Mixpanel. For more information, see Group Key.
Web SDK settings
SettingDescription
Use Mixpanel PeopleSends all your identify calls to Mixpanel People. See the Mixpanel People section for more information.
Automatically set all Traits as Super Properties and People propertiesWhen you turn on this setting, RudderStack sets all the identify traits as super properties and people properties if Use Mixpanel People setting is turned on. See Setting People Properties and Super Properties for more information.
Ignore “Do Not Track”If turned on, the native Mixpanel SDK ignores the “Do Not Track” setting of your web browser. This setting is applicable when sending events in web device mode.

The Mixpanel SDK cannot send events if Send a 'Do Not Track' request with your browsing traffic setting is turned on in the Chrome browser.
Track All Pages to Mixpanel with a Consolidated Event NameThis setting is turned on by default and tracks the Loaded a Page events to Mixpanel for all page method calls.

Note: Do not turn off this setting as Mixpanel recommends using it to send your events.
Track Categorized Pages to MixpanelTurn on this setting to track events for page calls that have an associated category.

For example, a page call like rudderanalytics.page("Docs", "Index") results in RudderStack sending the event Viewed Docs Index Page to Mixpanel.
Track Named Pages to MixpanelTurn on this setting to track events for page calls that have an associated name.

For example, a page call like rudderanalytics.page("Signup") results in RudderStack sending the event Viewed Signup Page to Mixpanel.
Source NameIf specified, RudderStack sends this source name to Mixpanel for every event/page/screen call.
Cross Subdomain CookieLets you persist the Mixpanel cookie between different pages of your application.
Persistence TypeLets you choose the persistence storage method for your Mixpanel cookies. RudderStack provides the following options:

  • None: Mixpanel will not persist the cookie.
  • Cookie: Mixpanel persists the cookie in the browser’s cookie storage.
  • Local Storage: Mixpanel persists the cookie in local storage.
Persistence NameSpecify a name for the Mixpanel cookie. RudderStack adds it as a suffix for the Mixpanel cookie name.
Secure CookieTurn on this option to mark the Mixpanel cookie as secure, that is, it will only transmit over HTTPS.
Properties to send as Super PropertiesSpecify the event properties that RudderStack sets as Super Properties in Mixpanel.
Properties to set only onceSpecify the identify traits as Mixpanel properties whose values you do not want to change at the user profile level. Once specified, Mixpanel will not overwrite these fields with new values later.

See Properties to set only once section for more information.
Traits to set as People PropertiesSpecify the identify traits that RudderStack sets as People Properties in Mixpanel.
Events to increment in PeopleSee Incrementing events in Mixpanel People for more information.
Percentage of SDK Initializations that qualify for Replay Data CaptureSpecify the percentage of events (0-100) that Mixpanel considers for session replay. If you do not specify any value, RudderStack sets this field to 0 by default, meaning Mixpanel does not consider any events for session replay.

See Events sent for session replay for more information on using this setting.
SettingDescription
Consent management providerConfigure the consent management settings for the specified source by choosing the consent management provider from the dropdown.

Note: If you choose Custom, make sure to pass the custom consent data to SDK.
Other settings
SettingDescription
Client-side Events FilteringFilter events before sending them to Mixpanel. See the Client-side Event Filtering guide for more information.

Next steps



Questions? Contact us by email or on Slack