Latest 1.0.2
Homepage https://github.com/MobileAppTracking/segment-integration-ios
License MIT
Platforms ios 8.0
Dependencies Analytics, Tune
Authors

Version
License
Platform

Setup

Use the TuneIntegration factory when initializing Segment in your application:

SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"SEGMENT_WRITE_KEY"];
[config use:[SEGTuneIntegrationFactory instance]];
[SEGAnalytics setupWithConfiguration:config];

Usage

Installs and App Opens

Measuring installs with TUNE is automatically wired into this integration, so you don’t need to worry about adding anything for that.

To measure app opens from deeplinks, add the following to your AppDelegate:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
    // when the app is opened due to a deep link, call the Tune deep link setter
    NSString *sourceApplication = options[UIApplicationLaunchOptionsSourceApplicationKey];
    [Tune applicationDidOpenURL:[url absoluteString] sourceApplication:sourceApplication];
    return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    // when the app is opened due to a deep link, call the Tune deep link setter
    [Tune applicationDidOpenURL:[url absoluteString] sourceApplication:sourceApplication];
    return YES;
}

Identify Users

SEGAnalytics 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.

SEGAnalytics reset:
will reset any user identifiers set by identify.

Track Actions

SEGAnalytics 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.

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Segment-Tune is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Segment-Tune"

Author

John Gu, [email protected]

License

Segment-Tune is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Segment-Tune",
    "version": "1.0.2",
    "summary": "Tune Integration for Segment iOS SDK.",
    "description": "Analytics for iOS provides a single API that lets younintegrate with over 100s of tools.nnThis is the TUNE integration for the iOS library.",
    "homepage": "https://github.com/MobileAppTracking/segment-integration-ios",
    "license": "MIT",
    "authors": {
        "TUNE": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MobileAppTracking/segment-integration-ios.git",
        "tag": "1.0.2"
    },
    "social_media_url": "https://twitter.com/tune",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Segment-Tune/Classes/**/*",
    "public_header_files": "Segment-Tune/Classes/**/*.h",
    "dependencies": {
        "Analytics": [
            "~> 3.0"
        ],
        "Tune": [
            "~> 4.0"
        ]
    }
}

Pin It on Pinterest

Share This