Clevertap
Getting started with Clevertap and setting it up
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
📱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 track
event 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 Charged Events 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:
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
Follow the steps to initialize the SDK here.
Add the following configuration in
main.dart
file:
Dart:
Android:
Please add below dependency in build.gradle file of your App:
Please add below config after replacing value with actual Clevertap Account id, Token in AndroidManifest.xml:
In you app's Application
class, add following line inside onCreate
:
If your app does not have Application
class, add this to your AndroidManifest.xml
file:
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:
Common in Flutter App:
Add the below code after replacing the token with actual push token, channelId, channelName, channelDescription:
For Clevertap sinking data automatically to Appsflyer:
This Appsflyer SDK object can be used for Unified deep linking.
Add Clevertap to React Native SDK
Step 1: Add the Lemnisk React Native dependency to your project by using the following command:
Step 2: Import the SDK wherever you'd like to use it in your react code base:
Please follow below steps in addition to steps documented here but use above npm dependency instead of 'lemnisk-react-native'.
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)
Android:
Please add below dependency in build.gradle file of your App:
Please add below config after replacing value with actual Clevertap Account id, Token in AndroidManifest.xml:
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.
Step 2: Run the below command
Note: If you are running this for the first time then you may need to update the pod repositories by running:
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.
After adding the above Clevertap initialisation, your AppDelegate.Swift
should look like the following:
Note:
Lemnisk account manager will provide you with the values for
writeKey
andserverUrl.
In the Clevertap Initialisation line, you can pass true/false to enable/Disable the debug logs.
Last updated