LogoLogo
WebsiteBlog
  • Introduction
  • CDP Overview
  • Identity Resolution
  • CDP Guidelines for Data Sanity and Campaign Governance
  • Login and User Management
    • Login to the platform
    • Change Password / Retrieve your Account
    • Role Based Access Control
      • User Management
      • Roles
    • Single Sign-On (SSO)
  • Events
    • Events Overview
    • App Events
    • Track
    • Identify
    • Page
    • Screen
    • Event Dictionary
  • Sources
    • Sources Overview
    • Android SDK
    • iOS SDK
    • JavaScript SDK
    • React Native SDK
    • Flutter SDK
    • REST API
    • Adobe Analytics Exports
    • SFTP
    • Kafka
    • Offline File Ingestion
  • Destinations
    • Destinations Overview
    • Quora Pixel
    • Hotjar
    • Clevertap
    • Google Analytics 4 (GA4)
    • Meta Pixel
    • Meta Conversion API
    • LinkedIn Insight Tag
    • Adobe Target
    • AppsFlyer
    • AWS S3
    • Criteo
    • Kafka
  • Integrations
    • Rudderstack
    • Azure Blob
    • Adobe Launch Private Extension
    • Adobe Launch Extension
    • Salesforce CRM
    • Microsoft Dynamics 365
  • Customer One View
    • Introduction
    • Basic details, Attributes and Devices
    • Segment and Engagement
    • Activity
  • Segments
    • Getting Started
    • Create a Segment
  • Channels
    • Getting Started
    • A/B Testing
    • SMS
      • Set up an SSP
        • Netcore
        • Twilio
        • Adobe Campaign Classic
        • Gupshup
        • Unifonic
        • Infobip
        • Tubelight
      • Add an SSP
      • Create SMS campaign
      • FAQs
    • Email
      • Set up an ESP
        • SendGrid
        • SendInBlue
        • SparkPost
        • Taximail
        • Netcore
        • Adobe Campaign Classic
        • Mailchimp
        • Oracle Email Delivery
        • Infobip
        • Vision6
      • 🆕Add an ESP
      • Create Email campaign
      • Common use cases with Email Editor
      • Why Email Notification may not get delivered?
      • FAQs
    • App Push Notification
      • Create App Push Notification - Android
      • Create App Push Notification - iOS
      • Why App Push Notification may not get delivered?
      • FAQs
    • WhatsApp
      • Configure a WSP
        • Yellow Messenger
        • Infobip
        • Gupshup
        • BIK.ai
        • Vonage
        • Sinch
        • Tubelight
      • Create WhatsApp campaign
      • FAQs
    • RCS
      • Add an RCS API
      • Example: Netcore RCS API
      • Create an RCS campaign
      • FAQs
    • Web Push Notification
      • Create a Web Push Notification
      • Create a Default Web Push Notification
      • FAQs
    • On-site Notification
      • Create On-site Notifications.
      • Common use cases with On-site Notification.
      • Notification Templates
    • Banner Personalization
      • Create a Personalized Banner
      • Create a Default Banner
    • External API
      • Create Engagement
      • Test your API configuration
      • Example Use Cases of External APIs
        • Use case 1: HubSpot - Create Contacts API
        • Use case 2: Exotel's Make a call API
        • Use case 3: Mailmodo's Send Campaign Email API
  • Ramanujan AI
    • Lead scoring
    • Channel Orchestration
    • Content Generator
      • Generate Web Push Content
  • Journey Builder
    • Overview- Journey Builder
    • View all Journeys
    • Create a Journey
    • Journey Reports
    • FAQs
  • Audience Export
    • Facebook Export Channel
    • Google Ads Export Channel
  • Analytics
    • Dashboard
      • Guiding through the Dashboard
      • Unique Profile
      • Profile and Merge Trends
      • Campaign and Revenue Dashboard
    • Campaign Summary
    • Events Occurrence
    • Event Telemetry
    • App Installs and Uninstalls
    • Funnels
    • Paths
    • Traffic Analysis
    • Cohorts
    • Data sanity between Funnels, Paths and Events
    • FAQs
  • Developer APIs
    • User Profile API
    • WhatsApp Opt-in/Opt-out API
    • Subscription Management
  • Settings
    • Product Label
    • Frequency Caps
    • Contacts
Powered by GitBook
On this page
  • Connection
  • Methods
  • Track
  • Identify
  • Page
  • Screen
  • Add Clevertap to Flutter SDK
  • Add Clevertap to React Native SDK
  1. Destinations

Clevertap

Getting started with Clevertap and setting it up

PreviousHotjarNextGoogle Analytics 4 (GA4)

Last updated 9 months ago

Once the Lemnisk SDK is integrated, share your CleverTap account ID and CleverTap account token with the Lemnisk customer success manager. You can find the account ID and account token in the CleverTap Dashboard under Settings.

Connection

Connection
Web
Mobile

​📱Device Mode

​✅

​✅ (Only Flutter SDK)

☁️Cloud Mode

✅

✅

Please note that the data being sent using cloud mode would be portrayed as though it were coming from the desktop on CleverTap Dashboard as technographic are only supported in device mode in CleverTap.

Methods

Track

When a trackevent is triggered, it is sent as Clevertap Custom Events along with its properties. You need to know that arrays or nested objects for custom track event properties are not supported in Clevertap.

Charged Event

A charged event is a special event that tracks/ records transactions or purchases. They provide transaction details such as the transaction id, transaction information, their categories and so on about the users.

Every purchase marked as a customer in CleverTap helps you differentiate between customer and non-customer.

You can refer to this doc to know more about in CleverTap.

We can map the event and event properties of your choice to Charged Event and its properties. Contact us for the same.

Please note that this track event can contain arrays and nested objects.

Identify

In CleverTap, every identified user profile has its own ID. However, we can add other IDs such as email, fbid etc., to identify a user. The user ID that you send via identify call is mapped to Clevertap Identity.

The following user properties will be automatically mapped to CleverTap default user properties:

Lemnisk
CleverTap

email

Email

phone

Phone

fbid (Only for Flutter SDK)

FBID

Any user ID passed as a parameter in the identify call

Identity

Except for the above properties, all the other user properties will be sent as custom properties.

Page

Flutter:

The page() calls and custom properties are sent as an equivalent event called Web Page Viewed: <page_name> to CleverTap.

Web:

The page() calls and custom properties are sent as an equivalent event called page to CleverTap.

Screen

The screen() calls and custom properties are sent as an equivalent event called Screen Viewed: <screen_name> to CleverTap.

Add Clevertap to Flutter SDK

  1. Add the following configuration in main.dart file:

Dart:

main.dart
//Clevertap params
LemniskCleverTapCore lemniskCleverTapCore = LemniskCleverTapCore(
  enable: true,
  isDebug: true
);

Android:

Please add below dependency in build.gradle file of your App:

build.gradle
implementation 'com.clevertap.android:clevertap-android-sdk:4.4.0'

Please add below config after replacing value with actual Clevertap Account id, Token in AndroidManifest.xml:

AndroidManifest.xml
<meta-data
android:name="CLEVERTAP_ACCOUNT_ID"
android:value="XXX-XXX-XXXX"/>
<meta-data
android:name="CLEVERTAP_TOKEN"
android:value="XXX-XXX-XXX"/>
<meta-data
android:name="CLEVERTAP_USE_GOOGLE_AD_ID"
android:value="1"/>

In you app's Application class, add following line inside onCreate:

public class MyApplication extends FlutterApplication {
        @java.lang.Override
        public void onCreate() {
           //Add below line.
            ActivityLifecycleCallback.register(this);
            super.onCreate();
        }
}

If your app does not have Application class, add this to your AndroidManifest.xml file:

<application
        android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:name="com.clevertap.android.sdk.Application
/>

iOS:

Please add below config in Info.plist

i. Add property CleverTapAccountID as String and set it's value.

ii. Add property CleverTapToken as String and set it's value. For Sending Push Notifications via Clevertap:

Please add the below config in AndroidManifest.xml:

<service android:name="com.clevertap.android.sdk.pushnotification.fcm.FcmMessageListenerService">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT" />
    </intent-filter>
</service>

Common in Flutter App:

Add the below code after replacing the token with actual push token, channelId, channelName, channelDescription:

LemniskHelper.setPushToken("token");

    if(Platform.isIOS) {
      CleverTapPlugin.registerForPush();
    }
    CleverTapPlugin.setPushToken("token");
    if (Platform.isAndroid) {
      CleverTapPlugin.createNotificationChannel(
          "channelId", "channelName", "channelDescription", 3, true);
    }

For Clevertap sinking data automatically to Appsflyer:

This Appsflyer SDK object can be used for Unified deep linking.

var appsflyerSdk = LemniskHelper.getAppsFlyerSdk();
CleverTapPlugin.getCleverTapID().then((ctId) => appsflyerSdk?.setCustomerUserId(ctId!));

Add Clevertap to React Native SDK

Step 1: Add the Lemnisk React Native dependency to your project by using the following command:

npm install --save lemnisk-react-native-clevertap@0.0.5

yarn add lemnisk-react-native@0.1.0

Step 2: Import the SDK wherever you'd like to use it in your react code base:

import LemniskSdk from 'lemnisk-react-native-clevertap';

Step 3: To enable Clevertap as the destination., add the following method call (Please call this from your react-native initialization module. If you call this for both Android and iOS then Clevertap initialization in AppDelegate is not required for iOS)

LemniskSdk.configureClevertap(true)

Android:

Please add below dependency in build.gradle file of your App:

build.gradle
implementation 'com.clevertap.android:clevertap-android-sdk:4.0.0'

Please add below config after replacing value with actual Clevertap Account id, Token in AndroidManifest.xml:

AndroidManifest.xml
<meta-data
android:name="CLEVERTAP_ACCOUNT_ID"
android:value="XXX-XXX-XXXX"/>
<meta-data
android:name="CLEVERTAP_TOKEN"
android:value="XXX-XXX-XXX"/>
<meta-data
android:name="CLEVERTAP_USE_GOOGLE_AD_ID"
android:value="1"/>

iOS:

Step 1: Add below dependencies in your Podfile. If you don't want to enable Push Notifications through Lemnisk SDK, you can skip this step.

platform :ios, 'YOUR_TARGET_PLATFORM_VERSION'

target 'YOUR_TARGET_NAME' do  
  use_frameworks!
    
end


target 'NotificationContentExtension' do
  use_frameworks!

  # Lemnisk Notification Content Extension
  pod 'Lemnisk-NotificationContent', '3.8.2'
end

target 'NotificationServiceExtension' do
  use_frameworks!

  # Lemnisk Notification Service Extension
  pod 'Lemnisk-NotificationService', '3.8.2'
end

Step 2: Run the below command

pod install

Note: If you are running this for the first time then you may need to update the pod repositories by running:

pod install --repo-update

Step 3: Add the below config in Info.plist

i. Add property CleverTapAccountID as String and set its value.

ii. Add property CleverTapToken as String and set its value.

Step 4: Add the below Line in didFinishLaunchingWithOptions function of AppDelegate.swift

Step 5: Add the below Clevertap Initialisation line in addition to the existing Lemnisk initialisation.

Lemnisk.shared.configureClevertap(isDebug: true)

After adding the above Clevertap initialisation, your AppDelegate.Swift should look like the following:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
    // Your code

    // Use the following App Groups set method, only if you are using the App Push Notifications from Lemnisk, otherwise please ignore this line.
    [[Lemnisk shared] setAppGroupIDWithGroupId:@"your app groupid"];  // This will be like co.lemnisk.app.ios.bankingdemo, which needs to be either created from Xcode or Apple Developer Account in the App Groups section

    // Initialize Lemnisk SDK
    [[Lemnisk shared] configureWithWriteKey:@"writeKey" serverUrl:@"xx-pl.lemnisk.co" enablePush:true];

    // Initialize Clevertap SDK    
    // Call this method to initialize Clevertap, only if you aren't initializing this from your React-Native module
    [[Lemnisk shared] configureClevertapWithIsDebug:false]; // set to true if you want to see the Clevertap debug logs

    // Your code
  }
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Your code
    
    // Use the following App Groups set method, only if you are using the App Push Notifications from Lemnisk, otherwise please ignore this line.
    Lemnisk.shared.setAppGroupID(groupId: "your app group id") // This will be something like co.lemnisk.app.ios.bankingdemo
    
    // Initialize Lemnisk SDK    
    Lemnisk.shared.configure(writeKey: "<writeKey>", serverUrl: "<xx-pl.lemnisk.co>", enablePush: true)
    
    // Initialize Clevertap SDK    
    // Call this method to initialize Clevertap, only if you aren't initializing this from your React-Native module    
    Lemnisk.shared.configureClevertap(isDebug: false) // set true to see logs if your app is in debug mode.  
    
    // Your code
}

Note:

  1. Lemnisk account manager will provide you with the values for writeKey and serverUrl.

  2. In the Clevertap Initialisation line, you can pass true/false to enable/Disable the debug logs.

Follow the steps to initialize the SDK .

Please follow below steps in addition to steps documented but use above npm dependency instead of 'lemnisk-react-native'.

Charged Events
here
here
Configuring clevertap