These docs are for v1.0. Click to read the latest docs for v2.0.

Integrations for iOS

Google Analytics

Taplytics pushes experiment/variation info to the Google Analytics SDK in the following format:

id<GAITracker> tracker = [GAI sharedInstance].defaultTracker;
NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
for (NSString* experimentName in experimentsAndVariations.allKeys) {
    NSString* variationName = experimentsAndVariations[experimentName];
    [tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"TL_experiments"
                                           action:experimentName
                                            label:variationName
                                            value:nil] build]];
}
weak var tracker = GAI.sharedInstance().defaultTracker
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
for experimentName in experimentsAndVariations.keys {
    let variationName = experimentsAndVariations[experimentName]
    tracker?.send(GAIDictionaryBuilder.createEvent(withCategory: "TL_experiments", action: experimentName, label: variationName, value: nil).build())
}

Flurry

Taplytics logs experiment/variation events to the Flurry iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[Flurry logEvent:@"TL_experiments" withParameters:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Flurry.logEvent("TL_experiments", withParameters: experimentsAndVariations)

MixPanel

Taplytics tracks experiment/variation events to the Mixpanel iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[[Mixpanel sharedInstance] track:@"TL_experiments" properties:experimentsAndVariations];
[[Mixpanel sharedInstance] registerSuperProperties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Mixpanel.sharedInstance().track("TL_experiments", properties: experimentsAndVariations)
Mixpanel.sharedInstance().registerSuperProperties(experimentsAndVariations)

Please note that the MixPanel integration currently does not work for versions 5+


Amplitude

Taplytics logs experiment/variation events to the Amplitude iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};

[[Amplitude instance] logEvent:@"TL_Experiments" withEventProperties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]

Amplitude.instance().logEvent("TL_Experiments", withEventProperties: experimentsAndVariations)

Adobe

Taplytics logs experiment/variation events to the Adobe Omniture iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[ADBMobile trackAction:@"TL_experiments" data:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
ADBMobile.trackAction("TL_experiments", data: experimentsAndVariations)

Localytics

Taplytics logs experiment/variation events to the Localytics iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[[LocalyticsSession shared] tagEvent:@"TL_experiments" attributes:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
LocalyticsSession.shared().tagEvent("TL_experiments", attributes: experimentsAndVariations)

Segment

Taplytics logs experiment/variation events to the Segment iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 2"
};

[[SEGAnalytics sharedAnalytics] track:@"Experiment Viewed" properties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 2"
]

SEGAnalytics.shared().track("Experiment Viewed", properties: experimentsAndVariations)

Please note that unlike other integrations, segment expects multiple events. The above example is how a single one is sent.


Intercom

Taplytics logs experiment/variation events with Intercom in the following format:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[Intercom logEventWithName:@"TL_experiments" optionalMetaData:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Intercom.logEvent(withName: "TL_experiments", optionalMetaData: experimentsAndVariations)

Apsalar

Taplytics logs experiment/variation events to the Apsalar iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[Apsalar event:@"TL_experiments" withArgs:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Apsalar.event("TL_experiments", withArgs: experimentsAndVariations)

Parse

Taplytics logs experiment/variation events to the Parse iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[PFAnalytics trackEvent:@"TL_experiments" dimensions:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
PFAnalytics.trackEvent("TL_experiments", dimensions: experimentsAndVariations)

Heap

Taplytics logs experiment/variation events to the Heap iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[Heap track:@"TL_Experiments" withProperties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Heap.track("TL_Experiments", withProperties: experimentsAndVariations)

KISSMetrics

Taplytics logs experiment/variation events to the Kissmetrics iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[[KISSmetricsAPI sharedAPI] record:@"TL_Experiments" withProperties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
KISSmetricsAPI.shared().record("TL_Experiments", withProperties: experimentsAndVariations)

Firebase

Taplytics logs experiment/variation events to the Firebase iOS SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[FIRAnalytics logEventWithName:@"TL_Experiments" parameters:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
FIRAnalytics.logEvent(withName: "TL_Experiments", parameters: experimentsAndVariations)