Segment - Android Install

You can download the artifacts for android from the CleverTap Android Segment page.

For integration, download the Segment Analytics tools.

Installation

To install the Segment-CleverTap integration, simply add this line to your gradle file:

implementation 'com.clevertap.android:clevertap-segment-android:+'

Usage

After adding the dependency, you must register the integration. To do this, import the CleverTap integration:

import com.segment.analytics.android.integrations.clevertap.CleverTapIntegration;
import com.segment.analytics.android.integrations.clevertap.CleverTapIntegration

And add the following line:

Analytics analytics = new Analytics.Builder(this, "write_key")
                .use(CleverTapIntegration.FACTORY)
                .build();
var analytics = Analytics.Builder(this, "write_key")
.use(CleverTapIntegration.FACTORY)
.build()

Check the Segment documentation for more information.


Did this page help you?