Latest 1.0.2
Homepage https://github.com/kitefaster/kitemetrics_iOS
License Apache License, Version 2.0
Platforms ios 8.0
Authors

Kitemetrics iOS Client SDK

The Kitemetrics iOS Client SDK automatically logs Apple Search Ads keyword attributions, installs, and user sessions. In addition, you can log sign up and other custom events. Reports are available from http://kitemetrics.com/.

Contents

Requirements

  • iOS 8.0+ (iOS 7.0+ with manual install)
  • Xcode 8.0+
  • Objective-C or Swift 3.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.1.0+ is required to build Kitemetrics

To integrate Kitemetrics into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'Kitemetrics'
end

Then, run the following command:

$ pod install

Manually

If you want to support iOS 7 or prefer not to use the CocoaPods dependency manager, you can integrate Kitemetrics into your project manually by copy/pasting the files into your project or by adding as a git submodule.

Usage

Initialize the session in AppDelegate

Swift 3.0
import Kitemetrics

class AppDelegate: UIResponder, UIApplicationDelegate {

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
      Kitemetrics.shared.initSession(apiKey: "API_KEY")
      return true
  }
Objective-C
@import Kitemetrics;

@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[Kitemetrics shared] initSessionWithApiKey:@"API_KEY"];
    return YES;
}

Log purchase and Sign Up Events

Swift 3.0
    Kitemetrics.shared.logInAppPurchase(skProduct, quantity: 1)
    Kitemetrics.shared.logSignUp(method: "email", userIdentifier: "12345abc")
Objective-C
    [[Kitemetrics shared] logInAppPurchase:skProduct quantity:1];
    [[Kitemetrics shared] logSignUpWithMethod:@"email" userIdentifier:@"12345abc"];

Full list of pre-defined and custom events are available at the full documentation.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Documentation

Full documentation is available at http://kitemetrics.com/docs/.

Notes

Kitemetrics uses the Advertising Identifier (IDFA). When submitting an app to Apple you should answer "Yes" to the Advertising Identifier question and check the box next to "Attribute an action taken within this app to a previously served advertisement".

License

The Kitemetrics iOS client SDK is available under the Apache License, Version 2.0. See the LICENSE file for more info.

Latest podspec

{
    "name": "Kitemetrics",
    "version": "1.0.2",
    "summary": "iOS App Analytics, Apple Search Ads Attribution, and Reporting.",
    "description": "Kitemetrics provides keyword level attribution for Apple Search Ads. It associates each attribution to an In-App Purchase. The Kitemetrics web service calculates the Average Revenue per User.",
    "homepage": "https://github.com/kitefaster/kitemetrics_iOS",
    "license": {
        "type": "Apache License, Version 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Kitefaster, LLC": ""
    },
    "source": {
        "git": "https://github.com/kitefaster/kitemetrics_iOS.git",
        "tag": "1.0.2"
    },
    "social_media_url": "https://twitter.com/kitefasterApps",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Kitemetrics/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This