Mixpanel Import (Cohort)
Understand how to import cohorts from Mixpanel
Overview
Mixpanel integration enables the following capabilities:
- Import Mixpanel cohorts to the CleverTap dashboard
- Engage with users from the imported cohort by using Campaigns and Journeys in the CleverTap dashboard
- Export campaign events to Mixpanel for further analysis. For more information, refer to Mixpanel Export.
When exporting cohorts from Mixpanel, the Partner Sync event is raised and cohorts are exported as segments in CleverTap. The user from the CleverTap dashboard can then engage with the segment and export the engagement events data to Mixpanel for further analysis.
Prerequisites
The following are the prerequisites for Mixpanel Import:
- Integrate CleverTap SDK and set
$CleverTap_user_id
in Mixpanel using Mixpanel SDK methods or APIs. For more information, refer to Set Common User Identifier between CleverTap and Mixpanel. - Enable CleverTap Integration.
Mixpanel Project Admin
You must be a Mixpanel project admin to enable the CleverTap integration from the Mixpanel dashboard. For more information, see Project Roles and Permissions β Mixpanel Help Center.
Set Common User Identifier between CleverTap and Mixpanel
A common identifier is used to match users between Mixpanel and CleverTap. For more information about matching user profiles, refer to User Identity Management. The common user identifier is set up in the following two ways:
Using SDK Methods
The value that is passed in $CleverTap_user_id
should be the same as passed in mixpanel.identify
(β123456β)
// Sets user "$CleverTap_user_id" attribute to "123"
mixpanel.getPeople().set("$CleverTap_user_id", "123");
// replace the value of $CleverTap_user_id with the User Identity value set in
// CleverTap SDK for the profile and not the CleverTap ID.
// Sets user "$CleverTap_user_id" attribute to "123"
Mixpanel.mainInstance().people.set(properties: [ "$CleverTap_user_id":"123"])
// Sets user $CleverTap_user_id attribute to "123"
[mixpanel.people set:@{@"$CleverTap_user_id": @"123"}];
// Sets user $CleverTap_user_id attribute to "123"
mixpanel.people.set({
'$CleverTap_user_id': '123'
});
Using Mixpanel APIs
The Value that is passed in $CleverTap_user_id
should be the same as passed in $distinct_id
.
curl --request POST \
--url 'https://api.mixpanel.com/engage#profile-set' \
--header 'Accept: text/plain' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'data={
"$token": "YOUR_PROJECT_TOKEN",
"$distinct_id": "13793",
"$ip": "123.123.123.123",
"$set": {
"$CleverTap_user_id": "123"
}
}
// replace the value of $CleverTap_user_id with the User Identity value set in
// CleverTap for the profile.
Enable CleverTap Integration
To enable the integration:
- Click the icon in the top navigation bar and then select Integrations.
-
From the Integrations page, select CleverTap and then click Connect.
-
Enter the following project details to authorize the connection. These details are obtained by navigating to the Settings page of the CleverTap dashboard.
- Project ID
- Passcode
- Region
To identify the region of your account, check the URL of your CleverTap account.
Refer to the following table to identify the region for your account:
CleverTap Dashboard URL | Region |
---|---|
https://eu1.dashboard.clevertap.com/login.html#/ | EU |
https://in1.dashboard.clevertap.com/login.html#/ | India |
https://us1.dashboard.clevertap.com/login.html#/ | US |
https://sg1.dashboard.clevertap.com/login.html#/ | Singapore |
https://aps3.dashboard.clevertap.com/login.html#/ | Indonesia |
https://eu1.dashboard.clevertap.com/login.html#/ | Middle East (UAE) |
After establishing the connection successfully, the CleverTap integration displays a βConnectedβ tag (see figure below).
Import Cohorts
Verify User Identification
To ensure that the user profiles imported from Mixpanel are correctly identified in CleverTap, we recommend importing a smaller cohort before proceeding with larger cohorts.
To import cohorts from Mixpanel:
- Navigate to Cohorts from the Mixpanel dashboard by clicking Cohorts under Users in the navigation bar.
- Select the cohort that you want to export and then click on the icon to the right side of the cohort.
- Select Export to > CleverTap.
- Select one of the following sync types and then click Start Sync:
-
One-time Sync
In the case of one-time sync, Mixpanel sends a one-time list of users who are currently part of the cohort to CleverTap. The cohort name defined in the Mixpanel dashboard appears as the segment under the Segment list page of the CleverTap dashboard. -
Dynamic Sync
In the case of dynamic sync, Mixpanel initiates sync between a cohort and CleverTap every 15 minutes. The imported segment is updated every 15 minutes to reflect the most recent list of users in the segment. The cohort name defined in the Mixpanel dashboard appears as the segment under the Segment list page of the CleverTap dashboard.
Delay in Sync Initialization
The sync initialization from Mixpanel may take up to 15 minutes to start exporting users after it is enabled from the Mixpanel dashboard.
Mixpanel Cohort Sync
Every dynamic cohort sync from Mixpanel includes only the users added or removed from the cohort after the last sync.
User Identity Management
Mixpanel exports only identified users to other partners, such as CleverTap. When receiving segments from Mixpanel, the user identity is matched in the following manner:
- If the
$CleverTap_user_id
is present, it is matched with the identity value of all the users present in CleverTap. If a match is found, the profile becomes part of the segment. - If the $CleverTap_user_id` is not present or does not match with a user profile in CleverTap, then a new user profile is created and becomes part of the segment.
Refer to the following scenarios to understand how profiles are merged to become a part of the segment in Clevertap.
-
Scenario 1:
$CleverTap_user_id
is not defined for user identified in the Mixpanel platform
If the$CleverTap_user_id
for User A is not set for a Mixpanel profile (identified) andmixpanel_distinct_id
= 123456, the Partner Sync event is raised with Identity = 123456 in the CleverTap platform. -
Scenario 2:
$CleverTap_user_id
andmixpanel_distinct_id
is defined for the user in the Mixpanel
If the$CleverTap_user_id
for User A = 123456 andmixpanel_distinct_id
= 986791, the Partner Sync event is raised with Identity = 123456 ($CleverTap_user_id
) in the CleverTap platform.
Additional User Properties
During Mixpanel cohort export, Mixpanel may also send the Email and Phone numbers of the users to CleverTap when available. These user profile properties are also updated in the Clevertap system user property (email and phone number).
View Segment
The exported Mixpanel cohort is displayed under the Segments list page in the CleverTap dashboard. The Type column under the Segments list page for the exported cohort is displayed as Partner - Mixpanel.
Click the segment to view the statistics for this segment, like any other segment on the CleverTap dashboard.
Use Partner - Mixpanel Segment for Segmentation
You can also engage with the cohorts imported from Mixpanel by creating different campaigns and journeys.
The process of creating campaigns for the Past Behavior Segment and Live Behavior Segment is the same except for where we need to select the segment.
Select Segment for Past Behavior Campaigns/Journeys
To select the segment:
- From the dashboard, select Campaigns.
- Click + Campaign.
- From the Messaging Channels list, select the messaging channel.
- Click Who and filter the target audience by selecting With User Properties > Segments.
- Select the imported user segment from the available list of segments.
Scenario: Customer wants to send an In-App Message campaign to the user from Bangalore city when they launch the mobile application.
In this case, the customer will create a cohort in the Mixpanel dashboard and initiate a one-time export to CleverTap for engagement activities. On the CleverTap dashboard, the customer will create an In-App campaign for this cohort of users. To create the campaign, the customer will navigate to In-App Campaign and select the segment under the Who segment section in the following way:
- Select App Launched event under As soon as the user does section.
- Select Filter on past behavior and user properties checkbox.
- Select With user properties > Segments and then select the segment name from the list.
Select Segment for Live Campaigns/Journeys
To select the segment:
- From the dashboard, select Campaigns.
- Click + Campaign.
- From the Messaging Channels list, select the messaging channel.
- Click Who and then select Partner Sync event from the list.
- Click Filter and then select Event Property Action = Added.
Partner Sync Event
The Partner Sync event is raised every time CleverTap receives a cohort sync request from Mixpanel.
- Filter the target audience by selecting Segments under With User Properties.
- Select the imported user segment from the available list of segments.
Scenario: Customer wants to send a recurring Email campaign to the users that added an item to the cart but did not purchase the item.
In this case, the customer will create a cohort in the Mixpanel dashboard and initiate a recurring export to CleverTap for engagement activities. On the CleverTap dashboard, the customer will create a recurring Email campaign for this cohort of users. To create the campaign, the customer will navigate to Email Campaign and create the campaign in the following way:
- Select Start here > Live Behavior.
- Select Partner Sync event under As soon as the user does section.
- Click Filter and then select Event Property Action = Added.
- Select Filter on past behavior and user properties checkbox.
- Select Segments under With user properties and then select the segment name from the list.
Use Partner-Mixpanel Segment in Find People
To find the Partner-Mixpanel Segment:
- Navigate to Segments > Find People from the CleverTap dashboard.
- Select Partner Sync event from the Users who did section.
- Select Segments under Display common properties such as and select the segment name from the list.
Partner Sync Event
The Partner Sync event is raised for all the users who are part of the Mixpanel cohort. The following table provides information about the properties of the event:
Property Name | Description | Property Value/Example |
---|---|---|
Partner Segment Name | Indicates the name of the cohort exported from Mixpanel | For example, Cart Drop off |
Action | Indicates if the user has been added or removed from the segment in CleverTap dashboard |
|
Partner Segment ID | Indicates the Cohort ID in the Mixpanel dashboard | For example, 1638361188 |
CT Source | Indicates the source of event | Mixpanel |
Partner Name | Indicates the name of the partner | Mixpanel |
Campaign Exceptions for Partner Sync Event
The Partner Sync event cannot be used as a trigger event to create the campaigns for the following channels as it is not an SDK event:
- In-App Messages
- Web Popup
- Web Exit Intent
- App Inbox
- Native Display
Contribution towards Billing
The Partner Sync event contributes to data points for MAU Billing Type and as an event for Container Billing Type.
Troubleshooting
This section provides information about common errors/problems faced during Mixpanel Import.
Problem: The cohort does not display on the CleverTap dashboard even after successfully connecting the CleverTap account from the Mixpanel dashboard.
Resolution: Ensure that the following details are correctly entered when connecting the CleverTap account:
- CT Account ID
- Passcode
- Region
These details can be obtained by navigating to the Settings > Project page of the CleverTap dashboard (see figure below):
For more information about identifying the region of your account, refer to Enable Integration.
Updated 6 months ago