TrackingSession
public class TrackingSession : NSObject
TrackingSession is the representation of one usage of your application. You can collect and submit several PageView-Objects with a session.
-
Transmit Modde
- ETTransmitModeImmediatelyAsync: Transmit data immediately and asynchronous
- ETTransmitModeImmediatelySync: Transmit data immediately and synchronous
- ETTransmitModeLaterBatch: Collect data and transmit later and asynchronous
Declaration
Swift
public enum ETTransmitMode -
returns users visitorId
Declaration
Swift
public var visitorId: String? -
returns sessionId
Declaration
Swift
public var sessionId: String? -
Declaration
Swift
public var batchAutoTransmitTimeout: Int { get set } -
Undocumented
Declaration
Swift
public var samplingRate: Int { get set } -
Undocumented
Declaration
Swift
public var defaultPrivacySettingsNewUser: PrivacySettings { get set } -
Undocumented
Declaration
Swift
public var privacySettings: PrivacySettings { get set } -
Initialize a Tracking Session with the given parameters
Declaration
Swift
public convenience init(with settings: Settings)Parameters
settingsa Settings object containing all the necessary parameters
-
Initialize a Tracking Session with the given parameters
Declaration
Swift
public init(with clientKey: String? = nil, secure: Bool = true, batchAutoTransmitTimeout: Int = -1)Parameters
clientKeyyour econda account registration key
securesecure whether to transmit with https or http
batchAutoTransmitTimeoutbatchAutoTransmitTimeout autotransmit collected pageviews after x seconds
-
Registers a pageView for later submission
Declaration
Swift
public func add(pageView: TrackingPageView, transmitMode: ETTransmitMode)Parameters
pageViewpageView AN instance of TrackingPageView
transmitModetransmitMode
-
Append data to already submitted pageView. (After method addPageView with the original pageView is called) Not all Properties could be appended to the original pageView.
Declaration
Swift
public func appendData(to previousPageView: TrackingPageView, transmitMode: ETTransmitMode = .ETTransmitModeImmediatelySync)Parameters
previousPageVieworiginal submitted pageView
-
You can indicate by calling of this method, that the application user has restarted usage of your application.
Declaration
Swift
public func nextSession() -
Transmit all collected data.
Declaration
Swift
@discardableResult public func submitBatch(synchron: Bool) -> (httpStatusCode: Int, httpStatusMessage: String)?Parameters
synchronsynchron A BOOL value to set synchron data transfer on or off
-
Set this to YES to log debugging information. Default is NO
Declaration
Swift
public func set(loggingEnabled: Bool)Parameters
loggingEnabledloggingEnabled A BOOL value to enable or disable logging
TrackingSession Class Reference