Amplitude Import (Cohort)
Understand how to import cohorts from Amplitude to CleverTap.
Overview
Amplitude, an analytics and business intelligence platform, helps make informed decisions for targeting users. This integration allows you to import cohorts (segments) from Amplitude into CleverTap and provides different benefits described in the below section.
Key Benefits
Here are some of the key benefits of this integration:
- Enhanced Cohort Management: Leverage Amplitude's product analytics to create targeted cohorts (segments) in CleverTap for personalized messaging and engagement campaigns based on user behaviors and preferences captured in Amplitude.
- Comprehensive Event Tracking: Capture and analyze user interactions within CleverTap, such as app installs, uninstallations, push notifications, and in-app messages, in Amplitude for a holistic view of user engagement across both platforms.
- Data-Driven Decision Making: Make informed decisions and optimize your customer engagement strategies by leveraging the combined insights from CleverTap and Amplitude's powerful analytics engines.
- Personalized and Relevant Campaigns: Deliver contextual and personalized messaging to your users based on their behaviors and preferences captured in Amplitude, leading to higher engagement and conversion rates.
- Streamlined Workflow: Seamlessly push cohorts (segments) and system events between CleverTap and Amplitude with a simple and intuitive setup, saving you time and effort in managing your marketing campaigns.
Prerequisites
Before you begin the integration, ensure that you have:
- Correctly map the Amplitude Cohorts (segments) to CleverTap Segments
- The required permission to create cohorts (segments) in the Amplitude account
Set Up
This procedure involves the following four major steps:
- Map User Identities for Amplitude Cohorts to CleverTap Segments
- Find CleverTap Project Details
- Configure CleverTap as a Destination in Amplitude
- Import Cohorts from Amplitude
Map User Identities for Amplitude Cohorts to CleverTap Segments
Amplitude exports all users to CleverTap, including anonymous users. A common identifier is used to match users when syncing cohorts (segments) from Amplitude to CleverTap. The following are the key points to remember when setting up an identifier on the Amplitude dashboard:
- Amplitude captures
User ID
andDevice ID
as an identifier for every profile. TheUser ID
is for identified profiles, whereas theDevice ID
is for every profile. - CleverTap allows
identity
,email
orphone
as an identifier for the users. It capturesDevice ID
as the CleverTap ID (Object ID) for every profile.
For more information about how users are identified, refer to the following section.
User Identity Management
The CleverTap User ID is a unique identifier assigned to the user in Amplitude. This identifier enables the mapping of user data between CleverTap and Amplitude, allowing for a more comprehensive understanding of user behavior and engagement across different channels. When importing cohorts (segments) from Amplitude, the user identity is matched in the following manner:
- If the CleverTap User ID is present in Amplitude, 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 in Amplitude, the Device Id (Anonymous Id) value is used as CleverTap ID, and a new profile is created in CleverTap. This new profile becomes part of the segment.
To understand this better, refer to the following diagram:
To understand how users are identified in different scenarios, read the following information:
Scenario 1: When a user's identity is the same in both Amplitude and CleverTap
Consider a scenario where user A is assigned the CleverTap User ID Clevertap1
in Amplitude, and the same user's identity is set as clevertap1
in CleverTap.
In this scenario, CleverTap raises a Partner Sync event for the user in CleverTap and includes the user in the segment (cohort).
Scenario 2: When a user's identity is different in Amplitude and CleverTap
Consider a scenario where user A is assigned the CleverTap User ID CleverTap1
in Amplitude, and the same user is identified with a different user identity in CleverTap, which is CleverTap2
.
In this case, the CleverTap creates a new profile for the same user with a new identity as CleverTap1
and raises a Partner Sync event to include the new profile in the segment (cohort).
To avoid this scenario, CleverTap recommends you push the CleverTap_Identity as the identity in Amplitude and use this identity when setting up CleverTap as a cohort (segment) destination. For more information, refer to Set Up Common User Identifier.
Scenario 3: When User A with Device ID is not identified in Amplitude
Consider a scenario where a user with Device ID 543C-3455-4555-3SRD
is not identified in Amplitude. In this scenario, CleverTap captures this Device ID (543C-3455-4555-3SRD
) as CleverTap ID (Object ID) and creates a new profile. After the new profile is created, CleverTap raises a Partner Sync event for this profile and includes the user in the segment (cohort).
Set Up Common User Identifier between CleverTap and Amplitude
When a user's identity differs between Amplitude and CleverTap, the common user identifier must be set up to identify and include the user in the cohort (segment). The following are two different ways of setting up a common identifier between the two platforms:
Using Amplitude APIs
The value that is passed in CleverTap_Identity
must be the same as that passed as identity in CleverTap.
curl --location --request POST 'https://api2.amplitude.com/identify' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'api_key=a0ccac7656a6e187b597f44476dd031e' \
--data-urlencode 'identification=[{"user_id":"amplitude_id", "user_properties":{"CleverTap_Identity":"[email protected]"}}]'
Set Up Identity
You must replace the value of
CleverTap_Identity
with the user identity value set in CleverTap for the profile. For example,[email protected]
is the identity set in CleverTap, so we must pass that value to Amplitude. If the value of the identity was12345
, we must pass the value as12345
.
Using Amplitude SDKs
The value that is passed in CleverTap_user_Id
must be the same as that passed in CleverTap.
val identify = Identify()
identify.set("CleverTap_Identity", "[email protected]")
amplitude.identify(identify)
AMPIdentify *identify = [[[AMPIdentify identify] set:@"CleverTap_Identity" value:@"[[email protected]]]];
[[Amplitude instance] identify:identify];
let identify = AMPIdentify()
.set("CleverTap_Identity", value: "[email protected]")
Amplitude.instance().identify(identify)
Find CleverTap Project Details
Find the following project details to authorize the CleverTap integration in the Amplitude dashboard:
Project Details
CleverTap suggests keeping the above details handy, as you will need them to configure the Amplitude dashboard.
Project ID
The Project ID can be obtained by navigating to the Settings > Project page of the CleverTap dashboard (see figure below):
Passcode
To find the passcode for your Amplitude Import project, refer to Account Passcode.
Account Passcode
When generating account passcode, we recommend you set the expiry date for passcode as Forever.
Region
To identify the region for your account, refer to the following table:
Region | API Endpoint | CleverTap Dashboard URL |
---|---|---|
Europe (Default region) | api.clevertap.com | https://eu1.dashboard.clevertap.com/login.html |
India | in1.api.clevertap.com | https://in1.dashboard.clevertap.com/login.html |
Indonesia | aps3.api.clevertap.com | https://aps3.dashboard.clevertap.com/login.html |
Middle East (UAE) | mec1.api.clevertap.com | https://mec1.dashboard.clevertap.com/login.html |
Singapore | sg1.api.clevertap.com | https://sg1.dashboard.clevertap.com/login.html |
South Korea | sk1.api.clevertap.com | https://sk1.dashboard.clevertap.com/login.html |
United States (USA) | us1.api.clevertap.com | https://us1.dashboard.clevertap.com/login.html |
Configure CleverTap as a Destination in Amplitude
To configure the Amplitude dashboard:
- Navigate to Destinations from the Amplitude dashboard and click + Add Destination.
- Click CleverTap from the MESSAGING DESTINATIONS.
- Enter the following details in the Connect to CleverTap form:
Field | Description |
---|---|
Name | Enter the name to uniquely identify the integration. |
CleverTap Region | Select the Region of your CleverTap account from the dropdown. |
Account ID | Enter the Project ID of your CleverTap account. |
Account Passcode | Enter the Passcode of your CleverTap account. |
Anonymous ID Mapping | Select Device ID as an identity to map anonymous users in CleverTap. For more information, refer to Map User Identity. |
CleverTap User ID Mapping | Select identity to map the identified users in CleverTap User ID. For more information, refer to Map User Identity. |
- Click Save. CleverTap is now displayed on the Destinations page.
Import Cohorts from Amplitude
Verify User Identifications
To ensure that the user profiles imported from Amplitude are correctly identified in CleverTap, we recommend importing a smaller cohort (segment) before proceeding with larger cohorts.
To import the cohorts (segments) from Amplitude to CleverTap:
- Navigate to Cohorts from the Amplitude dashboard.
- Select the cohort (segment) you want to import and click Sync.
- Select the destination as CleverTap and click Next.
- Select the API target to sync to your CleverTap project and click Next.
- Select one of the sync types and click Sync.
- One-time Sync: In the case of one-time sync, Amplitude sends a one-time list of users who are currently part of the cohort to CleverTap.
- Scheduled Sync: In the case of scheduled sync, Amplitude initiates sync between a cohort and CleverTap on an hourly or daily basis. The imported segment is updated as per the chosen sync type to reflect the most recent list of users in the segment.
- Real-Time: In the case of real-time sync, Amplitude sends a list of users in the cohort every minute to CleverTap. The real-time sync feature is available on request. To avail of this feature, contact your Amplitude team to enable it for your account.
Amplitude Cohort Sync
Every cohort sync from Amplitude includes only the users added or removed from the cohort after the last sync.
View Amplitude Cohorts in CleverTap
The cohort name defined in the Amplitude dashboard appears as the segment under the Segments list page of the CleverTap dashboard. The Type column under the Segments list page for the exported cohort is displayed as Partner - Amplitude.
Click the segment to view the statistics for this segment, like any other segment on the CleverTap dashboard.
You can also validate a user profile ingested from Amplitude using the Partner Sync event.
Engage with Amplitude Cohort on CleverTap
You can also engage with the cohorts (segments) imported from Amplitude 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.
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 (segment) in the Amplitude 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.
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 Amplitude.
- 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 (segment) in the Amplitude 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 the 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.
Find Amplitude Cohort from CleverTap Dashboard
To find the Amplitude cohort:
- Navigate to Segments > Find People from the CleverTap dashboard.
- Select the 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 different partner segments. The following table provides information about the event properties:
Property Name | Description | Property Value/Example |
---|---|---|
Partner Segment Name | Indicates the name of the cohort (segment) exported from Amplitude. | For example, Cart Drop off |
Action | Indicates if the user has been added or removed from the segment in the CleverTap dashboard. |
|
Partner Segment ID | Indicates the Cohort ID in the Amplitude dashboard | For example, 1638361188 |
CT Source | Indicates the source of the event. | Amplitude |
Partner Name | Indicates the name of the partner from where the segment was imported. | Amplitude |
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.
FAQs
Q. Can I export the CleverTap engagement data to Amplitude for analysis?
A. Yes. For more information, refer to Amplitude Export.
Updated 9 months ago