Inherits from NSObject
Declared in LimeAnalyticsManager.h
LimeAnalyticsManager.m

Overview

Copyright © 2015, Lime - HighTech Solutions s.r.o. (www.lime-company.eu).

All rights reserved. This source code can be used only for purposes specified by the given license contract signed by the rightful deputy of Lime - HighTech Solutions s.r.o. This source code can be used only by the owner of the license.

Any disputes arising in respect of this agreement (license) shall be brought before the Municipal Court of Prague.

Class Methods

sharedInstance

Get a shared instance of the analytics manager.

+ (LimeAnalyticsManager *)sharedInstance

Return Value

A (weak) singleton instance of the analytics manager.

Discussion

Get a shared instance of the analytics manager.

Declared In

LimeAnalyticsManager.h

Instance Methods

flush

Sends the events from the local queue of events and empties the local queue. This method is called automatically whenever \ref eventQueueSize (10 by default) is exceeded, or it can be called manually whenever a well defined batch of events is added in the queue (for example, when finished iterating over the collection that contains event data). This method starts sending data to the server, but if the connection or application is interupted, data may not reach the destination and events will not show up in the statistics.

- (void)flush

Discussion

Sends the events from the local queue of events and empties the local queue. This method is called automatically whenever \ref eventQueueSize (10 by default) is exceeded, or it can be called manually whenever a well defined batch of events is added in the queue (for example, when finished iterating over the collection that contains event data). This method starts sending data to the server, but if the connection or application is interupted, data may not reach the destination and events will not show up in the statistics.

Declared In

LimeAnalyticsManager.h

logEventWithName:

Logs an event with specific event name. Directly calls \ref logEventWithName:parameters: with nil parameters under the hood.

- (void)logEventWithName:(NSString *)eventName

Parameters

eventName

An event name, a string identifier that is unique for a given event type.

Discussion

Logs an event with specific event name. Directly calls \ref logEventWithName:parameters: with nil parameters under the hood.

Declared In

LimeAnalyticsManager.h

logEventWithName:parameters:

Logs an event with specific event name and parameters. The method adds a new instance of a LimeAnalyticsEvent object in the local queue of events. Whenever the queue size exceeds the value of the \ref eventQueueSize property (10 by default), a \ref flush method is called automatically. Note that events are not persisted in non-volatile memory. Killing an application before events are sent to the server will result in loss of events. Do not forget to call flush after you log some events that you need to log.

- (void)logEventWithName:(NSString *)eventName parameters:(NSDictionary *)parameters

Parameters

eventName

An event name, a string identifier that is unique for a given event type.

parameters

Parameters that are supplied to the event in order to provide more specific event details. The dictionary must be “flat”, only NSString and NSNumber values are allowed. Any number

Discussion

Logs an event with specific event name and parameters. The method adds a new instance of a LimeAnalyticsEvent object in the local queue of events. Whenever the queue size exceeds the value of the \ref eventQueueSize property (10 by default), a \ref flush method is called automatically. Note that events are not persisted in non-volatile memory. Killing an application before events are sent to the server will result in loss of events. Do not forget to call flush after you log some events that you need to log.

Declared In

LimeAnalyticsManager.h

startSessionForApplication:

Starts an analytics session for a given application.

- (void)startSessionForApplication:(NSString *)appKey

Parameters

appKey

APP_KEY of the given application.

Discussion

Starts an analytics session for a given application.

Declared In

LimeAnalyticsManager.h