Track ID 설정 및 이벤트 트래커 활성화

  • KakaoAdTracker.trackId 는 필수 입력 항목입니다.
  • activate API 는 이벤트 트래커를 활성화 시킵니다. (AppDelegate의 applicationDidBecomeActive 함수내에 구현하는것을 추천합니다.)
Objective-C
#import "AppDelegate.h"
#import <KakaoAdSDK/KakaoAdSDK.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    // 반드시 설정이 필요한 항목
    KakaoAdTracker.trackId = @"Input Your Track ID";
    return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    // 이벤트 트래커를 활성화 시킵니다. 이곳에 구현할 경우 앱이 active (비활성화 상태에서 활성화 상태로 돌아올 때) 될 때 마다 앱실행 이벤트가 발생합니다. 
    [KakaoAdTracker activate];
}

@end
Swift
import UIKit
import KakaoAdSDK

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        // 반드시 설정이 필요한 항목
        KakaoAdTracker.trackId = "Input Your Track ID"
        return true
    }

    func applicationDidBecomeActive(_ application: UIApplication) {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
        // 이벤트 트래커를 활성화 시킵니다. 이곳에 구현할 경우 앱이 active (비활성화 상태에서 활성화 상태로 돌아올 때) 될 때 마다 앱실행 이벤트가 발생합니다.
        KakaoAdTracker.activate()
    }


}