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
SourceIdentifyPageScreenTrack
Cloud mode
All sourcessupportedsupportedsupportedsupported
Device mode
Websupportedsupportednot supportedsupported
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
API TokenYour Mixpanel Project Token.

RudderStack recommends using Service Accounts for authenticating your Mixpanel project.
Service Account UsernameYour Mixpanel service account username.
Service Account SecretThe secret associated with the above service account.

See Mixpanel Help Center for more information on setting up your Mixpanel service account and getting the username and secret.
Project IDYour Mixpanel project ID.

See Mixpanel Help Center for more information.
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.
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.
Strict ModeIf turned on, Mixpanel validates the requests and returns errors for each failed event. See Mixpanel Import Events API 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.

Device mode settings

The following settings are applicable if you are sending events to Mixpanel via web device mode:

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.
Events to increment in PeopleSee Incrementing events in Mixpanel People for more information.
Properties to increment in PeopleSee Incrementing properties in Mixpanel People for more information.
Page tracking settingsFor sending page events to Mixpanel in web device mode, RudderStack provides the following settings:

  • Track All Pages to Mixpanel with a Consolidated Event Name
  • Track Categorized Pages to Mixpanel
  • Track Named Pages to Mixpanel
See Page section for more information.

Other settings

SettingDescription
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.
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.
Use New MappingThis option is disabled by default and is applicable only if you are sending events to Mixpanel in cloud mode.

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.
Client-side Events FilteringSee the Client-side Event Filtering guide for more information.
OneTrust consent categoriesThis setting lets you associate the OneTrust cookie consent groups to Mixpanel.

Next steps


Questions? Contact us by email or on Slack