This feature is available only with paid Kochava accounts. Contact us to learn more.
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.
Getting Started
- Create an App within Kochava. For information on creating your app, refer to Create and Manage Apps.
- Within Segment, click Add Destination.
- Search for “Kochava” in the Catalog, select it.
- Select the source(s) to connect the destination to.
- Within Kochava, copy the Kochava App GUID. For more information on locating your App GUID, refer to our support documentation.
- 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.
- To install, add the following lines to the your Segment Podfile:
- Import the header and initialize the configuration:
pod "Analytics"
pod "Analytics-iAds-Attribution"
#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.
Segment Events
screen
: Kochava event name isscreen-{properties.name}
where if properties.name does not exist it will simply bescreen
.track
: Kochava event name istrack-{properties.name}
where if properties.name does not exist it will simply betrack
.page
: Kochava event name ispage-{context.page.path}-{context.page.title}
where if either field is missing its associated value including its respective-
is removed. Where it could be justpage
if both fields are missing.group
: Kochava event name isgroup
.alias
: Kochava event name isalias
.identify
: Kochava event name is identify.- Idetity Links can be added to any payload and are pulled as follows:
- User ID: Pulls from
user_id
oruserId
. - Anonymous ID: Pulls from
anonymous_id
oranonymousId
. - Adobe ID: Pulls from
traits.adobe_id
,traits.adobeId
,context.traits.adobe_id
, orcontext.traits.adobeId
.
- User ID: Pulls from
Reference Information: