Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

BranchMetrics/segment-integration-android

Repository files navigation

This repo is deprecated

TUNE Segment Integration for Android

Download

Segment integration for the TUNE Android SDK.

Installation

To install the TUNE Segment integration, simply add these lines to your module's build.gradle file:

dependencies {
  compile 'com.segment.analytics.android:analytics:4.+'
  compile 'com.tune:tune-segment-integration:1.1.0'
}

Setup

Add the following permissions to your application's AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

Add TUNE's referrer receiver to your AndroidManifest.xml inside your app's <application> tags:

<application>
    ...

    <receiver android:name="com.tune.TuneTracker">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>
</application>

Use the TuneIntegration factory when initializing Segment in your Application:

Analytics analytics = new Analytics.Builder(getApplicationContext(), "SEGMENT_WRITE_KEY")
    .use(TuneIntegration.FACTORY)
    .build();

Now you can use the Segment SDK to measure events with TUNE!

Usage

Installs and App Opens

Measuring installs and app opens from deeplinks with TUNE is automatically wired into this integration, so you don't need to worry about adding anything for that.

Identify Users

analytics.identify();

will set user id in TUNE. If present, the email, phone, and username fields will automatically set corresponding user identifier fields in TUNE, to be sent with any future events.

analytics.reset();

will reset any user identifiers set by identify.

Track Actions

analytics.track();

will measure events in TUNE. If present, the revenue, currency, orderId, productId, and category fields will automatically map to corresponding fields for the event in TUNE.

License

See LICENSE file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages