Overview

The iOS SDK is designed to provide an easy way for application developers to instrument their application to enable measurement and reporting in Effective Measure's planning dashboard. Instructions are provided for implementing the SDK using X-Code.

Unique Browser (UUID)

The unique browser identifier used the identifierForVendor Objective-C system call. The discussion on the value for this is provided below.

For details on how this identifier works, see Apple's official documentation.

Sessions and Duration

The sessions (visits) and duration are maintained by the SDK. Cookies are not required to track sessions and duration, however, the methodology for calculating sessions and duration is written to mimic the cookie based metrics.

Page Impressions

A page impression is recorded by the SDK every time the tracker methods are invoked. You can manually invoke impressions on screens using the track instance methods.

User Agent

The user agent string is collected using the navigator.userAgent javascript property from WebKit..

Implementation

  • Download the libEmTracker library and header from the downloads section below.
  • Add both to your iOS application.
  • In AppDelegate.m in the appropriate place for your application entry point (e.g. didFinishLanchingWithOptions), Add the following calls to track your initial page view:
// Import statement, At the top of the file.
#import "EmTracker.h"
 
EmTracker *tracker = [EmTracker sharedInstance];

// replace "test" with a URL safe app name string
// replace "testiOS.com" with your domain name
// replace "sdk-key-here" with the app key as provided by EM
[tracker configure:@"test" tld:@"testiOS.com" sdkKey:@"sdk-key-here"];

// Actually track the default event and specify content
// Use Empty string if content descriptor not required
[tracker trackContent:@”contentDescip"];

Refer to the "SDK Initialization" section of the  Effective Measure Android App Measurement SDK page for a detailed description of the configuration parameters.

If you need to change other settings, please refer to the EmTracker.h header file for a reference of iOS-specific options (and tracker methods) and how to use them.

Downloads

Did this answer your question?