CleverTap

Airbridge supports integration with CleverTap - a retention cloud that empowers digital brands to increase customer retention and lifetime value. With the integration, you can leverage the attribution data from Airbridge and the AI/ML-powered insights from CleverTap to deliver hyper-personalized engagement campaigns to customers.

After the integration is set up, the install events, in-app events, and attribution data can be sent to CleverTap.

Integration

To implement the server-to-server integration, the App Instance ID of the Firebase Analytics SDK should be set as the device alias of the Airbridge SDK.

Minimum SDK version required

  • Airbridge Android SDK: v.2.19.5

  • Airbridge iOS SDK: v.2.18.0

  • Airbridge React Native SDK: v.1.5.0

  • Airbridge Cordova SDK: v.2.0.2

  • Airbridge Flutter SDK: v.3.0.2

  • Airbridge Unity SDK: v.1.9.0

SDK setup

Attention

Once the SDK setup is complete, make sure to complete the required setup process in the Airbridge dashboard to implement the integration successfully.

Add the codes below to the Airbridge SDK. Without adding the codes, CleverTap won't be properly integrated with Airbridge even if the necessary setup is completed in the Airbridge dashboard.

Android

12345678910111213141516171819202122
// MainApplication.java
@Override
public void onCreate() {
    super.onCreate();
    // Initialize Airbridge SDK
    AirbridgeConfig config = new AirbridgeConfig.Builder("APP_NAME", "APP_TOKEN")
        // Make Airbridge SDK explicitly start tracking
        .setAutoStartTrackingEnabled(false)
        .build();
    Airbridge.init(this, config);
    
    // Fetch CleverTapID from CleverTap SDK
    CleverTapAPI.getDefaultInstance(this).getCleverTapID(new OnInitCleverTapIDListener() {
        @Override
        public void onInitCleverTapID(String cleverTapID) {
            // Set device alias into Airbridge SDK
            Airbridge.setDeviceAlias("clevertap_device_id", cleverTapID);
            // Explicitly start tracking
            Airbridge.startTracking();
        }
    });
}

iOS

123456789101112131415
// AppDelegate.swift
func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?
) {
    AirBridge.setAutoStartTrackingEnabled(false)
    AirBridge.getInstance("YOUR_APP_TOKEN", appName:"YOUR_APP_NAME", withLaunchOptions:launchOptions)

    CleverTap.autoIntegrate()
    if let cleverTapID = CleverTap.sharedInstance()?.profileGetID() {
        AirBridge.setDeviceAlias(withKey:"clevertap_device_id", value:String(cleverTapID))
    }

    AirBridge.startTracking()
}

React Native

The autoStartTrackingEnabled should be set to false in the airbridge.json.

1234
CleverTap.profileGetCleverTapID(function (error, cleverTapID) {
    Airbridge.state.setDeviceAlias("clevertap_device_id", cleverTapID)
    Airbirdge.state.startTracking()
})

Cordova

The autoStartTrackingEnabled should be set to false in the airbridge.json.

1234
CleverTap.getCleverTapID(function (cleverTapID) {
    Airbridge.state.setDeviceAlias("clevertap_device_id", cleverTapID)
    Airbirdge.state.startTracking()
})

Flutter

The autoStartTrackingEnabled should be set to false in the airbridge.json.

1234
CleverTapPlugin.getCleverTapID().then((cleverTapID) {
    Airbridge.state.setDeviceAlias("clevertap_device_id", cleverTapID)
    Airbirdge.state.startTracking()
})

Unity

The Auto Start Tracking Enabled should be set to false in the project settings.

123
string CleverTapID = CleverTapBinding.ProfileGetCleverTapID();
AirbridgeUnity.SetDeviceAlias("clevertap_device_id", CleverTapID);
AirbridgeUnity.StartTracking()

Airbridge dashboard setup

The Airbridge dashboard setup must be completed to implement the integration. For detailed instructions, refer to the user guide below.

Was this page helpful?

Have any questions or suggestions?