App log Analytics

App log Analytics provide real time feedback on users's usage on your app which means you can analyze user's usage patterns and analyze problems

These are the functionalities that app log analysis provide.

  • Usage(User count/Usage count) : Provides index on how many users use your App. We define the number of people using your app as session. Session includes numbers from user starting the app to exiting from app.
  • Events: Provides index on which menu/functionalities are mostly used among users when using your app. If user makes certain moves while using your app, it will be recorded as event and analyze them for you.
  • Engagement : Provide index on how long users use your app to how long it takes for users to return to your app.
  • Retention: Provides index on how often your app is being used by the first time registered users. If you see high retention rate, you can put your hopes on success but if retention rate is low, you can analyze the problem and make higher retention rate.
  • Revisit(Recurrence) : Provide index on how often particular event happens from certain user.
  • Flow(Usage flow) : Show app flow of steps on users use the most. You can view and analyze it on standard of actual screen or by event
  • Funnel(Funnel analysis): Provide index on changes in number of user from consecutive event and its return rate.
  • Custom Metric: Provide statistics on Metric set by App developers. Custom metric can be set by mixing event with operator.
  • Monetization: Provide index on how much profit occurred from certain events from users.

For those who have never used app log analytics before, refer to app log analytics, which will give you sense on how to define events and view analyzed data.

Before getting started

Download iOS's most recent version of Analytics SDK. This file contains library for app log analysis, header file, and sample source with project files. Refer to sample source to develop App with SDK applied.

1. In a unzipped folder, libKinsight-SDK-iOS.a and KinsightSession.h file will exists. Include Static library and header file in a app project folder to analyze targeted app.

sdk-ios-analytics-add-sdk

2. Following Dynamic library and Framework will be added to app's project.

  • libsqlite3.dylib
  • libz.dylib
  • CoreTelephony.framework
  • Security.framework

sdk-ios-analytics-add-libs

3. Add below by following from project setting, targets Build Settings, Linking > Other Linker Flags

  • -ObjC
  • -all_load

sdk-ios-analytics-add-linker-flag

4. Native App key of key registered in Kakao developer website should also be registered in native app's plist. Add key with the name "KAKAO_APP_KEY", in which type should be String, and value must be filled in with native app key.

sdk-ios-analytics-add-app-key

5. Import header file KinsightSession.h .

#import “KinsightSession.h”

6. In order to initialize Analytics SDK, initialization related code must be entered in didFinishLaunchingWithOptions which is of AppDelegate's.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ...
    // Object initialization for Analytics session management.
    [[KinsightSession shared] initialize];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    ...
}

Setting and example code for app log analytics, please refer to sample project in SDK.

Session management

From starting app to exiting from it from session is a basic measurement for app log analytics. As such, method for opening and closing session must be called from AppDelegate to define session.
When session starts, it will be uploaded for analytic purposes. If time between ended session and session which you are about to start, is very short, the previous session should be reused. By such method, it will be treated as single session even if activity transition happens. Started session must be ended. Even in ending scenario transmittable data will be uploaded.

Ending and restarting app from AppDelegate follows.

- (void)applicationWillResignActive:(UIApplication *)application {
    // Expire session
    [[KinsightSession shared] close];
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Expire session
    [[KinsightSession shared] close];
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Open session
    [[KinsightSession shared] resume];
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Open session
    [[KinsightSession shared] resume];
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Expire session
    [[KinsightSession shared] close];
}

Add target for analysis

User event can be registered in session for analyzing user patterns.

1. In order to register event in user action, addEvent method must be called to deal with user actions.

- (void)yourOwnEventHandler {
  ...
  // Register user action(event)
  [[KinsightSession shared] addEvent:@"your own event name"];
  ...
}

2. In order to register not only event but also its properties as well, addEvent:attributes: method must be called to deal with user action.

Events additional properties must be structured in NSDictionary. Key should be string. Value Object should be either string or integer type(NSString, NSNumber such)(Maximum of 10 supported).

- (void)yourOwnEventHandler {
  ...
  NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
  // attribute of an event can have values of string or number type
  [attributes setObject:@"book" forKey:@"category"];
  [attributes setObject:@"button" forKey:@"object"];
  [attributes setObject:[NSNumber numberWithInt:3] forKey:@"count"];
  [attributes setObject:[NSNumber numberWithFloat:11.1] forKey:@"price"];
  [[KinsightSession shared] addEvent:@"your own event name" attributes:attributes];
  ...
}

3. In order to register users used screen in a session, tagScreen method call must be made from viewDidAppear in UIViewController

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    //register screen
    [[KinsightSession shared] tagScreen:@"screen #1"];
}

Last Modified : 2017-07-28