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:

  1. Map User Identities for Amplitude Cohorts to CleverTap Segments
  2. Find CleverTap Project Details
  3. Configure CleverTap as a Destination in Amplitude
  4. 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 and Device ID as an identifier for every profile. The User ID is for identified profiles, whereas the Device ID is for every profile.
  • CleverTap allows identity, email or phone as an identifier for the users. It captures Device 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:

User Identity Mapping When Importing Cohorts (segments) to CleverTap

User Identity Mapping When Importing Cohorts (segments) to CleverTap

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 was 12345, we must pass the value as 12345.

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):

CleverTap Project Details

CleverTap Project Details

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:

RegionAPI EndpointCleverTap Dashboard URL
Europe (Default region)api.clevertap.comhttps://eu1.dashboard.clevertap.com/login.html
Indiain1.api.clevertap.comhttps://in1.dashboard.clevertap.com/login.html
Indonesiaaps3.api.clevertap.comhttps://aps3.dashboard.clevertap.com/login.html
Middle East (UAE)mec1.api.clevertap.comhttps://mec1.dashboard.clevertap.com/login.html
Singaporesg1.api.clevertap.comhttps://sg1.dashboard.clevertap.com/login.html
South Koreask1.api.clevertap.comhttps://sk1.dashboard.clevertap.com/login.html
United States (USA)us1.api.clevertap.comhttps://us1.dashboard.clevertap.com/login.html

Configure CleverTap as a Destination in Amplitude

To configure the Amplitude dashboard:

  1. Navigate to Destinations from the Amplitude dashboard and click + Add Destination.
Destinations in Amplitude Dashboard

Destinations in Amplitude Dashboard

  1. Click CleverTap from the MESSAGING DESTINATIONS.
Messaging Destinations in Amplitude

Messaging Destinations in Amplitude

  1. Enter the following details in the Connect to CleverTap form:
Add Destination Details to Connect CleverTap

Add Destination Details to Connect CleverTap

FieldDescription
NameEnter the name to uniquely identify the integration.
CleverTap RegionSelect the Region of your CleverTap account from the dropdown.
Account IDEnter the Project ID of your CleverTap account.
Account PasscodeEnter the Passcode of your CleverTap account.
Anonymous ID MappingSelect Device ID as an identity to map anonymous users in CleverTap. For more information, refer to Map User Identity.
CleverTap User ID MappingSelect identity to map the identified users in CleverTap User ID. For more information, refer to Map User Identity.
  1. Click Save. CleverTap is now displayed on the Destinations page.
Add CleverTap as a Destination in Amplitude

Add CleverTap as a Destination in Amplitude

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:

  1. Navigate to Cohorts from the Amplitude dashboard.
Cohorts Page in Amplitude Dashboard

Cohorts Page in Amplitude Dashboard

  1. Select the cohort (segment) you want to import and click Sync.
Sync a Cohort (segment) from Amplitude Dashboard

Sync a Cohort (segment) from Amplitude Dashboard

  1. Select the destination as CleverTap and click Next.
Select CleverTap as a Destination for Sync

Select CleverTap as a Destination for Sync

  1. Select the API target to sync to your CleverTap project and click Next.
Select API Target as CleverTap

Select API Target as CleverTap

  1. Select one of the sync types and click Sync.
Define the Cadence for Cohort Sync from Amplitude

Define the Cadence for Cohort Sync from Amplitude

  • 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.

View Synced Cohort in CleverTap

View Synced Cohort in CleverTap

Click the segment to view the statistics for this segment, like any other segment on the CleverTap dashboard.

View Segment Details

View Segment Details

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:

  1. From the dashboard, select Campaigns.
  2. Click + Campaign.
  3. From the Messaging Channels list, select the messaging channel.
  4. Click Who and filter the target audience by selecting With user properties > Segments.
  5. Select the imported user segment from the available list of segments.
Select the Imported Segment for Past Behavior Campaigns/Journeys

Select the Imported Segment for Past Behavior Campaigns/Journeys

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:

  1. Select App Launched event under As soon as the user does section.
  2. Select Filter on past behavior and user properties checkbox.
  3. Select With user properties > Segments and then select the segment name from the list.

For Live Campaigns/Journeys

To select the segment:

  1. From the dashboard, select Campaigns.
  2. Click + Campaign.
  3. From the Messaging Channels list, select the messaging channel.
  4. Click Who and then select Partner Sync event from the list.
  5. 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.

  1. Filter the target audience by selecting Segments under With User Properties.
  2. Select the imported user segment from the available list of segments.
Select the Imported Segment for Live Campaign/Journeys

Select the Imported Segment for Live Campaign/Journeys

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:

  1. Select Start here > Live Behavior.
  2. Select Partner Sync event under the As soon as the user does section.
  3. Click Filter and then select Event Property Action = Added.
  4. Select Filter on past behavior and user properties checkbox.
  5. 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:

  1. Navigate to Segments > Find People from the CleverTap dashboard.
  2. Select the Partner Sync event from the Users who did section.
  3. Select Segments under Display common properties such as and select the segment name from the list.
View the Imported Cohort from Find People

View the Imported Cohort from Find People

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.

  • Added
  • Removed
Partner Segment IDIndicates the Cohort ID in the Amplitude dashboardFor example, 1638361188
CT SourceIndicates the source of the event.Amplitude
Partner NameIndicates 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.