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
settings
a 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
clientKey
your econda account registration key
secure
secure whether to transmit with https or http
batchAutoTransmitTimeout
batchAutoTransmitTimeout autotransmit collected pageviews after x seconds
-
Registers a pageView for later submission
Declaration
Swift
public func add(pageView: TrackingPageView, transmitMode: ETTransmitMode)
Parameters
pageView
pageView AN instance of TrackingPageView
transmitMode
transmitMode
-
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
previousPageView
original 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
synchron
synchron 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
loggingEnabled
loggingEnabled A BOOL value to enable or disable logging