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.

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.
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.
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.
  • Device mode settings

    The following settings are applicable if you are sending events to Mixpanel in 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.
    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.
    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