Apptimize Destination

Destination Info
Components
Connection Modes
Device-mode Cloud-mode
Web Web
Mobile Mobile
Server Server
Partner Owned
  • This integration is partner owned. Please reach out to the partner's support for any issues.

Apptimize empowers product teams to efficiently run A/B tests, rollout and manage new features, and deliver personalized user experiences. Our Apptimize destination code is open-source. You can browse the code on GitHub for iOS and Android.

Getting Started

  1. From the Segment web app, click Catalog.
  2. Search for “Apptimize” in the Catalog, select it, and choose which of your sources to connect the destination to.
  3. In the destination settings, enter your Apptimize application key, the 31 character key which you can find in your Apptimize app settings.
  4. Depending on the mobile library you’ve selected, follow the below instructions to complete your setup.

_NOTE: There is also an advanced setting to publish Apptimize experiment data to Segment. If you choose to automatically record screen events or track Application lifecycle events, these will also be reflected in Apptimize. You also have access to all normal Apptimize non-Segment functionality. To integrate, simply pull in the destination as a dependency and include the Apptimize Integration Factory when setting up Segment Analytics. _

iOS

  1. Include the dependency through Cocoapods:
     pod "Segment-Apptimize"
    
  2. Update code:
     SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY_HERE"];
     [config use:[SEGApptimizeIntegrationFactory instance]];
     ...
     [SEGAnalytics setupWithConfiguration:config];
    

Android

  1. As Apptimize is hosted as a Maven repository, you will need to add it like so:
     maven { url 'http://maven.apptimize.com/artifactory/repo' }
    
  2. Include the dependency through Gradle:
     compile 'com.apptimize.segment:apptimize-segment-integration:+'
    
  3. Update code:
    Analytics analytics = new Analytics.Builder(context, "YOUR_WRITE_KEY_HERE")
      .use(ApptimizeIntegration.FACTORY)
      ...
      .build();
    

Manually Initialize Apptimize

Since both iOS and Android destinations are initialized asynchronously by Segment, you can manually initialize Apptimize and run experiments without waiting for Segment to initialize for you.

Note: Make sure that the Apptimize app key matches the key in the Segment dashboard.

iOS

Set the plist property ApptimizeAppKey to the corresponding app key for the app.

Android

Use the [Apptimize.setup](https://sdk.apptimize.com/android/javadocs/javadoc-2.12.10/com/apptimize/Apptimize.html#setup(android.content.Context,%20java.lang.String){:target=”_blank”} API to initialize Apptimize with the app key.

It is important to note that if the app keys in the plist/code and the Segment dashboard do not match, the SDK will use the app key from the plist/code as it finishes initialization first. While it is safe to initialize Apptimize multiple times in the app, to avoid confusion, be very careful that the app key is the same in both the places.

Screen

If you’re not familiar with the Segment Specs, take a look to understand what the Screen method does. An example iOS call would look like:

[[SEGAnalytics sharedAnalytics] screen:@"Photo Feed"
                            properties:@{ @"Feed Type": @"public" }];

When you record a screen, Apptimize will track an event of the form Viewed [Screen name] screen. If you choose to automatically record screen events, they will appear in Apptimize in the above format.

Identify

If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does. An example iOS call would look like:

[[SEGAnalytics sharedAnalytics] identify:@"12091906-01011992"
                                traits:@{ @"email": @"john.doe@example.com" }];

When you identify a user, Segment will pass that user’s information to Apptimize. The Segment userId field is passed to Apptimize as an Apptimize custom attribute called userId. Similarly Segment’s built-in traits appear in Apptimize as custom attributes, e.g. name, firstName, address. You can also define arbitrary traits of your choice. The destination will recognize integer attributes; all other traits will be sent as strings.

Track

If you’re not familiar with the Segment Specs, take a look to understand what the Track method does. An example iOS call would look like:

[[SEGAnalytics sharedAnalytics] track:@"Article Completed"
                           properties:@{ @"title": @"How to Create a Tracking Plan", @"course": @"Intro to Analytics" }];

When you track an event, the event will be marked in Apptimize as an occurence of an Apptimize event of the same name.

Optional: You can also specify a value for each event, by adding a value property to the event when tracking. This is useful, for instance, when you want to track the price of orders each time a user clicks “Buy” in your app’s shopping cart. Including an example iOS call below:

[[SEGAnalytics sharedAnalytics] track:@"Item Purchased"
                           properties:@{ @"item": @"Sample Item", @"value": @5.23 }];

Send Experiment Data from Apptimize

If the advanced setting Send experiment data to other tools (as a track call) is checked, we will automatically collect the event Experiment Viewed.

This event supports the following semantic properties:

Property Type
experimentId String
experimentName String
variationId String
variationName String

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

Setting Description
App Key
(required)
string. You can find your App Key on the Apptimize settings page
Shared application group string. This option controls if Apptimize should share its data with widgets.
Apptimize EU Data Center boolean, defaults to FALSE .

Toggle this switch ON if you are implemented in Apptimize’s European Data Center. If you are unsure which data center you are on please reach out to support@apptimize.com.
Delay Apptimize start until tests are available number, defaults to 0.

This option controls how long (in milliseconds) Apptimize will wait for tests and their associated data to download.
Enable Device Pairing boolean, defaults to TRUE .

This option controls whether Apptimize will attempt to pair with the development server.
Include Winner and Instant updates to test info boolean, defaults to FALSE .

This option governs whether Apptimize will show winning variants and instant updates when forceVariant is used.
Send experiment data to other tools (as a track call) boolean, defaults to FALSE .

Sends the experiment and variation information as properties on a track call.
Apptimize SDK Log Level string. Set the log level of the Apptimize library. The available values are: verbose, debug, info, warn, error, and off.
Export Apptimize participation to third-party boolean, defaults to TRUE .

This option controls whether Apptimize will automatically export events to third-party analytics frameworks.
Import events from third-party SDKs boolean, defaults to TRUE .

This option controls whether Apptimize will automatically import events from third-party analytics frameworks.

This page was last modified: 27 Oct 2023



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account