Skip to main content

Introduction

Mixpanel makes analytics self-serve for your product teams and enables everyone to answer questions around user conversion, retention, and activation.

Scope

The MoEngage and Mixpanel integration allow you to import Mixpanel Cohorts into MoEngage to create segments that can be used to target users in future campaigns. You can also leverage MoEngage streams to export your campaign events to Mixpanel to drive deeper analytics into conversions, retention, and product usage.

Benefits and Use Cases

Analyze your users in Mixpanel and engage with them using MoEngage. The following use-cases provide integration value addition to your analytics + user engagement activities:

E-commerce

Understand the seasonal changes in purchase trends that are happening and send rich push notifications to such users via MoEngage. For example, target the cohort of users who purchase high-value items during summers and send rich push notifications with similar recommended items.

Travel

You can create a cohort in Mixpanel of millennial users who are also premium users of your app and send them popular and unique holiday destination recommendations via MoEngage emails.

E-learning

Understand where your users are dropping off while watching a video series on your platform and bring them back with engaging campaigns! Through insights into user behavior, you are armed with a holistic picture of exactly what actions can trigger a user to return to the app.

Integration

PrerequisitesEnsure you have login credentials for MoEngage and Mixpanel.
The Mixpanel Integration with MoEngage consists of two parts:

Cohort Sync from Mixpanel to MoEngage

Mixpanel to MoEngage integration allows you to export cohorts in Mixpanel to MoEngage and send personalized campaigns to all the users under this cohort from MoEngage.

Streaming MoEngage Events to Mixpanel

MoEngage to Mixpanel integration allows you to export the campaign interaction events generated after your users engage with the MoEngage campaigns to Mixpanel.

Setting up MoEngage integration on Mixpanel

To setup MoEngage Integration on Mixpanel, follow the below steps:
  1. Log in to Mixpanel and navigate to Data Management > Integrations. Mixpanel Data Management Integrations menu
  2. On the Integrations page, search MoEngage and click on the CONNECT button. You will see a pop-up to enter the MoEngage credentials as described: Mixpanel MoEngage integration connect popup
  3. Fill the following fields from the MoEngage dashboard by navigating to Settings > Account > API Settings: MoEngage General Settings page showing the Workspace ID and API keys
  4. Click save on continue to connect MoEngage as an integration.
For more information, refer to Mixpanel - MoEngage Integration.

Exporting Cohorts from Mixpanel to MoEngage

Ensure your cohort name starts with a period (.) and must not contain the following restricted characters: |, *, ?, \, :, <, >, =, $, ".
To export specific cohorts from Mixpanel to MoEngage, follow these steps:
  1. Navigate to the cohorts page on Mixpanel dashboard. Mixpanel cohorts page showing the cohort list
  2. Click on the three dots menu on the right-hand side of any cohort and use the Export to option to export the particular cohort to MoEngage. Mixpanel cohort Export to option A pop-up is displayed.
  3. In the Export to MoEngage pop-up, select one of the following: Export to MoEngage popup with sync options
  4. Click Begin Sync to export.
  5. Check the export status after you export the cohort as described. Mixpanel cohort export status

Using Cohorts in MoEngage Campaigns

Once an export is complete, you will be able to see the cohort as a custom segment in MoEngage as in the following image: Mixpanel cohort as a custom segment in MoEngage The custom segment can be used in any MoEngage campaigns to send personalized messages to the users under this segment.

User Mapping between Mixpanel and MoEngage

When you are exporting cohorts from Mixpanel to MoEngage, all users in your Mixpanel cohort will be attempted to be mapped with unique user profiles in MoEngage. We will be relying on a unique user identifier that will be present across Mixpanel and MoEngage users for mapping. This identifier will also be used when sending campaign events from MoEngage to Mixpanel. You need to ensure that you are adding an alias for your Mixpanel distinct_id and that the same identifier is used as ID (unique user id) in MoEngage. For more information on tracking unique user id in MoEngage, refer to:
Users in your Mixpanel cohort attempted to map with unique user profiles in MoEngage. If MoEngage systems do not have that user profile, the user is not mapped and not added to the cohort/segment.In this scenario, you may find fewer users in the MoEngage cohort compared to the Mixpanel cohort. Make sure you have all users in MoEngage before you perform the cohort sync.

Exporting Campaign Data from MoEngage to Mixpanel

PrerequisitesExports to Mixpanel makes use of MoEngage Streams, which is an add-on.
On your MoEngage Dashboard, go to the App Marketplace and search for Mixpanel.
  1. Click on + Add Integration to add a new integration.
  2. Fill out the form. Mixpanel integration in the MoEngage App Marketplace
  3. Mixpanel project token - This is available on your Mixpanel Dashboard > Settings > Overview > Access Keys > Project Token as shown below: Mixpanel project settings showing Project Token
  4. Select the events you want to forward. By default, MoEngage will be sending the data points mentioned in the next section to Mixpanel.
  5. Click on Connect to save the integration.
All the events sent by MoEngage are displayed in Mixpanel by filtering basis $source = MOENGAGE. These events are sent to Mixpanel in near real-time and use the Mixpanel distinct_id for mapping user profiles between MoEngage and Mixpanel.
Ensure that you are setting the mixpanel_distinct_id as the unique user id in MoEngage.

Export Data

The following data points are by default sent to Mixpanel:
Points to remember for events sent to Mixpanel
  • All events sent to Mixpanel have UID by default. This captures the value of the ID which is present in a unique user profile in MoEngage. This is also used to match a user in Mixpanel basis the value of the mixpanel_distinct_id.
  • All campaign events have campaign_id, campaign_name, campaign_type, campaign_channel by default.
  • All email campaign events have email_id as moe_email_id by default.
  • All push campaign events have push_id as moe_push_id by default.
  • All SMS campaign events have a mobile number as moe_mobile_number by default.
  • All campaign events of the campaign are a part of MoEngage Flows have two additional attributes parent_flow_id and parent_flow_name are present.
  • All campaigns having multiple variations or locales have the following additional attributes:
    • variation_id
    • locale_id
    • locale_name
  • All events have moengage_user_id by default. This is a MoEngage internal user identifier and is populated with each event in MoEngage.
  • All events generated from the mobile app contain a moengage_device_id, which is a MoEngage internal identifier.

Troubleshooting

The user count for the segment is 0?

Please check if the custom segment name is “All users”. All users is reserved for MoEngage and cannot be used as the custom segment name.

The segment is not showing up on MoEngage dashboard?

Please check archived segments on MoEngage. You can check your archived segments here. Please unarchive your segment and then retry.

Frequently Asked Questions

It typically takes up to 30 minutes for the automated data exports to be set up for your account and for you to start seeing data there.
Yes, if you need to export new events at a later time, you can always edit your configuration on the App Marketplace and get the new events added to your exports.
As of now, you cannot export historical data using Automated Data Exports. Once configured, you will start seeing data for each event from the time you enabled your exports.
If your billing plan does not cover this already and you need to get this enabled at a later time, you would need to work with your Customer Success Manager to get this included in your billing plan. Based on the amount of data that MoEngage will place in your Data warehouse/Partner/API on a monthly basis, this could lead to additional charges.