Segment Integration

The following document defines the process for creating a S2S (Server-to-Server) connection between Kochava and Segment.

 

Data Needed Before Beginning Process:

  • Kochava App GUID (Globally Unique Identifier) (obtained from the Kochava user interface)

 

NOTE: This integration is designed exclusively for users who have already integrated the Segment SDK. If you do not have an attribution-enabled SDK integrated, please refer to our SDK Integration support documents.

 

BEST PRACTICES: If strict authentication rules are being utilized, ensure that the procedures and policies within the Kochava Install Authentication Integration support documentation have been followed.


Getting Started

  1. Create an App within Kochava. For information on creating your app, refer to Create and Manage Apps.
  2. Within Segment, click Add Destination.
  3. Search for “Kochava” in the Catalog, select it.
  4. Select the source(s) to connect the destination to.
  5. Within Kochava, copy the Kochava App GUID. For more information on locating your App GUID, refer to our support documentation.
  6. Paste the App GUID into the Segment Destinations Settings > API Key.

For information on setting up your first campaign within Kochava, refer to our Create an Install Campaign support document.

NOTE: If your Segment account has access to Functions, you can utilize Segment Functions to leverage Kochava’s standard Server to Server Integration for a more customizable solution. Please reach out to your Segment rep for details on how to use Functions, and please reference Kochava’s Server to Server Integration support docs for details on our S2S endpoint and payload spec

 

Example Markdown File:

SegmentIntegrationMarkdownFile


Track Method

The track API call is how you record any actions your users perform, along with any properties that describe the action. Kochava is able to accommodate any post-install track event that is passed into its system. Events, when received for the first time, will auto provision into the Kochava dashboard. For more information on the Track Method, refer to the Segment support documentation.

An example call would look like:

[[SEGAnalytics sharedAnalytics] track:@"Item Purchased" properties:@{ @"item": @"Sword of Heracles", @"revenue": @2.95 }];

Install Attributed Postback:

To create a Kochava-Certified Postback that will send campaign information to Segment after attributing an Application Installed event, refer to our Create a Kochava-Certified Postback support documentation.


Apple Search Ads:

To get iAD attribution data into Kochava, you must include the analytics-ios-iads-attribution dependency and version 3.6.0 or higher of the Analytics SDK.

  1. To install, add the following lines to the your Segment Podfile:
  2. pod "Analytics"
    pod "Analytics-iAds-Attribution

  3. Import the header and initialize the configuration:
  4. #import <Analytics-iAds-Attribution/SEGADTracker.h>
    
    // Initialize the configuration as you would normally.
    SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
    ...
    
    // Configure the client with the iAD middleware to attach iAd properties.
    configuration.middlewares = @[ [SEGADTracker middleware] ];
    
    [SEGAnalytics setupWithConfiguration:configuration];

 

When iAd information is available, all track events will be augmented. The attribution information is transformed to Segment context this way:

[analytics track:@"Application Installed",
    properties: nil,
    options: @{
      @"context" : @{
        @"campaign" : @{
          @"provider" : @"Apple",
          @"click_date" : attributionInfo[@"iad-click-date"],
          @"conversion_date" : attributionInfo[@"iad-conversion-date"],
          @"source" : @"iAd",
          @"name" : attributionInfo[@"iad-campaign-name"],
          @"content" : attributionInfo[@"iad-keyword"],
          @"ad_creative" : attributionInfo[@"iad-org-name"],
          @"ad_group" : attributionInfo[@"iad-adgroup-name"],
          @"id" : attributionInfo[@"iad-campaign-id"],
          @"ad_group_id" : attributionInfo[@"iad-adgroup-id"]
        }
      }
    }];

 

Kochava is currently the only integration which supports Apple Search Ads. Information in passed through the context object, this will not be received by other downstream integrations, unless explicitly mapped.


Engage

You can send computed traits and audiences created with Engage to this destination as a user property.

For user-property destinations, Engage sends an Identify call to the destination for each user that is added or removed from an audience. The property name is the snake_cased version of the audience name you provide, with a boolean (true/false) value to indicate if they’re a member of the audience. For example, when a user first completes an order in the last 30 days, Engage sends an identify call with the property order_completed_last_30days: true, and when this user no longer satisfies these criteria (if the user does not complete another order over 30 days) Engage sends another Identify call to set that value to false.

When Engage first creates the audience, it sends an Identify call for every user in the audience. Later syncs only update users which were added or removed since the last sync.

 
 

Last Modified: Oct 16, 2023 at 10:26 am