Getting Started

Once the Segment library is integrated, toggle CleverTap on in your Segment destinations, and add your CleverTap Account ID and CleverTap Account Token which you can find in the CleverTap Dashboard under Settings.

You can integrate CleverTap via a server-side or mobile destination (iOS or Andriod). If you are interested in using CleverTap’s push notifications or in-app notifications products, you should use the mobile destinations.

All server-side destination requests require either a Segment Anonymous ID or a userId in the payload.

Identify

When you identify a user, we’ll pass that user’s information to CleverTap with userId as CleverTap’s Identity value. A number of Segment’s special traits map to CleverTap’s standard user profile fields. You’ll pass the key on the left into Segment and we will transform it to the key on the right before sending to CleverTap.

name maps to Name

birthday maps to DOB

avatar maps to Photo

gender maps to Gender

phone maps to Phone

email maps to Email

All other traits will be sent to CleverTap as custom attributes.

Track

When you track an event, we will send that event to CleverTap as a custom event. Note that CleverTap does not support arrays or nested objects for custom track event properties.

Order Completed

When you track an event via the server-side destination with the name Order Completed using the e-commerce tracking API, we will map that event to CleverTap’s Charged event.

Page

When you send a page event via the server-side destination, we will send that event to CleverTap as a Web Page Viewed event.

Screen

When you send a screen event via the server-side destination or the iOS bundled SDK, we will send that event to CleverTap as an App Screen Viewed event.

In-App Notifications

No further action is required to integrate in-app notifications, which are registered for and requested by default by our CleverTap Segment integration.

Sample App

CleverTap has created a sample iOS application that integrates CleverTap via Segment. Check it out at the Github repo.

Server-Side

Push Tokens

If you chose not to bundle the CleverTap Mobile SDK, then you will have to implement your own Push Message processors (and you won’t have access to CleverTap’s In-App feature).

If you decide to implement your own Push Message processors, then you can pass push tokens to CleverTap via the server-side destination. You can do this by sending it inside context.device.token.

Personas

You can send computed traits and audiences generated through Segment Personas to this destination as a user property. To learn more about Personas, reach out for a demo.

For user-property destinations, an identify call will be sent to the destination for each user being added and removed. The property name will be the snake_cased version of the audience name you provide with a true/false value. For example, when a user first completes an order in the last 30 days, we will send an identify call with the property order_completed_last_30days: true, and when this user no longer satisfies we will set that value to false.

When the audience is first created an identify call is sent for every user in the audience. Subsequent syncs will only send updates for those users which were added or removed since the last sync.

Supported Sources and Connection Modes

Web

Mobile

Server

📱 Device-based

✅

✅

☁️ Cloud-based

✅

✅

To learn more about about Connection Modes and what dictates which we support, see here.

Segment offers an optionalDevice-based Connection Mode for Mobile data with CleverTap. If you’d like to use those features that require client-based functionality, follow the steps above to ensure you have packaged the CleverTap SDK with Segment’s.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Account ID

Add your CleverTap Account ID which you can find in the CleverTap Dashboard under Settings.

Account Token

Mobile Only:Add your CleverTap Account Token which you can find in the CleverTap Dashboard under Settings.

Region

Server Only: Your dedicated Clevertap region.

If you have any questions, or see anywhere we can improve our documentation, please let us know!