Support Home > SDK Integration > SDK – KochavaTracker

SDK – KochavaTracker

SDK

KochavaTracker (iOS/tvOS)


  • A lightweight and easy to integrate SDK written in Objective-C, providing first-class integration with Kochava’s installation attribution and analytics platform.

     

    Platforms:

    • iOS
    • tvOS
    • watchOS

     

    Requirements:

    • Xcode 8.0

    Integration

    1. Add the SDK into your project.
    2. You have the option of downloading the SDK either using Cocoapods, or through the direct download of a zip file.

       

      Using Cocoapods –

      Install one of the following Pods:

       

      Direct Download –

      Download the zip file and add the contents to your project.

      iOS tvOS

       

      Download the zip file for the selected SDK.

      1. Extract the contents, and copy the included files into your project’s folder using Finder. You will typically want to add these files to the root folder of your project.
      2. Right-clicking on your project in Xcode, select “Add Files to (project name)” and the included files to your project.
      3. If you are working with multiple targets, you will want to ensure that you’ve included each of the included file(s) in the desired targets by selecting each file and reviewing its target membership in the inspector, which appears on the right side in Xcode.
      4. Ensure that the included static library (or framework) is included in Linked Frameworks and Libraries in your Project (located under General in Xcode 8). It will normally have been added at the moment you added the file to your target. If you are using an SDK which is distributed as a framework, you will need to include the framework in both the Embedded Binaries as well as Linked Frameworks and Libraries.
      5. Be aware that there are other frameworks that this SDK requires. With the current version of Xcode, and with the default build settings, you generally do not need to add these frameworks manually to your Linked Frameworks and Libraries. But if you’ve disabled automatic linking, then you may also need to add the following frameworks:
        • UIKit.framework
        • Foundation.framework
        • AdSupport.framework
        • iAd.framework
        • CoreLocation.framework
        • SystemConfiguration.framework

       

    3. Import KochavaTracker.h in your Objective-C Bridging Header.
    4. The current KochavaTracker iOS SDK is natively written in Objective-C. In order to use it from Swift you must import the SDK’s main header file in the Objective-C Bridging Header File. If you do not already have a bridging header you will need to create one. Information on Swift/Objective-C bridging.

       

      Sample Code:

       

    5. Configure a Tracker.
    6. The typical integration uses the instance. To configure it, first create a trackerParametersDictionary, and then perform the configuration using the designated configuration instance method configure(withParametersDictionary:delegate:). It is recommended that you call this in your UIApplicationDelegate instance method application(_:didFinishLaunchingWithOptions:).

       

      Sample Code:


    Using the SDK

     

    Sending Events:

    More than basic analytics, the events you send to Kochava are associated with your install attribution data, so that you can understand how the users who came to you through a particular ad went on to use the various features within your app. For more information, refer to class KochavaEvent.

     

    Sample Code –

     

    Setting Identity Link:

    You can link additional identifying information with a install, where it can be integrated with your analytics. For more information see instance method sendIdentityLink(with:).

     

    Getting Attribution:

    You can retrieve Kochava’s attribution information within your app. For more information see instance method tracker(_:didRetrieveAttributionDictionary:).

     

    Getting the Device ID:

    You can get the unique device identifier used by the tracker. For more information see instance method deviceIdString().

     

    Adjusting the Log Level:

    You can specify the types of entries which the tracker prints to the log. For more information see constant kKVAParamLogLevelEnumKey.


  • A lightweight and easy to integrate SDK written in Objective-C, providing first-class integration with Kochava’s installation attribution and analytics platform.

     

    Platforms:

    • iOS
    • tvOS
    • watchOS

     

    Requirements:

    • Xcode 8.0

    Integration

    1. Add the SDK into your project.
    2. You have the option of downloading the SDK either using Cocoapods, or through the direct download of a zip file.

       

      Using Cocoapods –

      Install one of the following Pods:

       

      Direct Download –

      Download the zip file and add the contents to your project.

      iOS tvOS

       

      Download the zip file for the selected SDK.

      1. Extract the contents, and copy the included files into your project’s folder using Finder. You will typically want to add these files to the root folder of your project.
      2. Right-clicking on your project in Xcode, select “Add Files to (project name)” and the included files to your project.
      3. If you are working with multiple targets, you will want to ensure that you’ve included each of the included file(s) in the desired targets by selecting each file and reviewing its target membership in the inspector, which appears on the right side in Xcode.
      4. Ensure that the included static library (or framework) is included in Linked Frameworks and Libraries in your Project (located under General in Xcode 8). It will normally have been added at the moment you added the file to your target. If you are using an SDK which is distributed as a framework, you will need to include the framework in both the Embedded Binaries as well as Linked Frameworks and Libraries.
      5. Be aware that there are other frameworks that this SDK requires. With the current version of Xcode, and with the default build settings, you generally do not need to add these frameworks manually to your Linked Frameworks and Libraries. But if you’ve disabled automatic linking, then you may also need to add the following frameworks:
        • UIKit.framework
        • Foundation.framework
        • AdSupport.framework
        • iAd.framework
        • CoreLocation.framework
        • SystemConfiguration.framework

       

    3. Import KochavaTracker.h in your AppDelegate
    4.  

      Sample Code –

       

    5. Configure a Tracker
    6. The typical integration uses the provided shared instance. To configure it, first create a trackerParametersDictionary, and then perform the configuration using the designated configuration instance method configureWithParametersDictionary:delegate:. It is recommended that you call this in your UIApplicationDelegate instance method application:didFinishLaunchingWithOptions:.

       

      Sample Code –


    Using the SDK

     

    Sending Events:

    More than basic analytics, the events you send to Kochava are associated with your install attribution data, so that you can understand how the users who came to you through a particular ad went on to use the various features within your app. For more information refer to class KochavaEvent.

     

    Sample Code –

     

    Setting Identity Link:

    You can link additional identifying information with a install, where it can be integrated with your analytics. For more information see instance method sendIdentityLinkWithDictionary:.

     

    Getting Attribution:

    You can retrieve Kochava’s attribution information within your app. For more information see instance method tracker:didRetrieveAttributionDictionary:.

     

    Getting the Device ID:

    You can get the unique device identifier used by the tracker. For more information see instance method deviceIdString.

     

    Adjusting the Log Level:

    You can specify the types of entries which the tracker prints to the log. For more information see constant kKVAParamLogLevelEnumKey.


Reference

For detailed information about the available classes and their associated resources, see the symbols below.

 

Symbols:

class KochavaTracker

The class KochavaTracker provides an interface between a host application and Kochava’s Attribution and Analytics Servers. A tracker manages the exchange of data between these two entities, along with the associated tasks and network transactions.

class KochavaEvent

The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.

 
 

Last Modified: Dec 5, 2017 at 11:29 am