This repo is deprecated
Segment integration for the TUNE Android SDK.
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'
}
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!
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.
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
.
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.
See LICENSE file.