Tracker
public class Tracker: NSObject
Wrapper class for tracking usage of your application
-
Tracker current delegate
Declaration
Swift
public var delegate: TrackerDelegate? -
Sets Tracker in debug mode and display debugger window
Declaration
Swift
public var enableDebugger: Bool = false
-
Return Publisher instance
Declaration
Swift
fileprivate(set) public lazy var publishers: Publishers = Publishers(tracker: self)
-
Return SelfPromotions instance
Declaration
Swift
fileprivate(set) public lazy var selfPromotions: SelfPromotions = SelfPromotions(tracker: self)
-
Return Identified visitor instance
Declaration
Swift
fileprivate(set) public lazy var identifiedVisitor: IdentifiedVisitor = IdentifiedVisitor(tracker: self)
-
Dynamic Screen tracking
Declaration
Swift
fileprivate(set) public lazy var dynamicScreens: DynamicScreens = DynamicScreens(tracker: self)
-
Return CustomObjects instance
Declaration
Swift
fileprivate(set) public lazy var customObjects: CustomObjects = CustomObjects(tracker: self)
-
Return TvTracking instance
Declaration
Swift
fileprivate(set) public lazy var tvTracking: TVTracking = TVTracking(tracker: self)
-
Return CustomVar instance - Deprecated : customVars is now only available as a screen object property.
Declaration
Swift
fileprivate(set) public lazy var customVars: CustomVars = CustomVars(tracker: self)
-
Return InternalSearch instance - Deprecated : internalSearch is now only available as a screen object property.
Declaration
Swift
fileprivate(set) public lazy var internalSearches: InternalSearches = InternalSearches(tracker: self)
-
Return CustomTreeStructures instance - Deprecated : customTreeStructures is now only available as a screen object property.
Declaration
Swift
fileprivate(set) public lazy var customTreeStructures: CustomTreeStructures = CustomTreeStructures(tracker: self)
-
Return MediaPlayers instance
Declaration
Swift
fileprivate(set) public lazy var mediaPlayers: MediaPlayers = MediaPlayers(tracker: self)
-
Initialisation with default configuration
Declaration
Swift
public convenience override init() -
Initialisation with a custom configuration
Declaration
Swift
public init(configuration: [String: String])Parameters
configurationmap that contains key/values. See TrackerConfigurationKeys
-
Get the current configuration (read-only)
Declaration
Swift
public var config: [String:String] -
Set a new configuration
Declaration
Swift
public func setConfig(_ configuration: [String: String], override: Bool = false, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
configurationA dictionary that contains new key/values. see TrackerConfigurationKeys.
overrideif true: the old configuration is full cleared - all default keys be set (optional, default: false)
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set one new key/value pair
Declaration
Swift
public func setConfig(_ key: String, value: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
keysee TrackerConfigurationKeys
value/
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new log
Declaration
Swift
public func setLog(_ log: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
logATInternet subdomain value
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new secure log
Declaration
Swift
public func setSecuredLog(_ securedLog: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
securedLogATInternet secured subdomain value
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new domain
Declaration
Swift
public func setDomain(_ domain: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
domainATInternet collect domain value
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new site ID
Declaration
Swift
public func setSiteId(_ siteId: Int, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
siteIdATInternet site identifier
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set the offline mode
Declaration
Swift
public func setOfflineMode(_ offlineMode: OfflineModeKey, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
offlineMode(required, always, never)
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Enable the secure mode (use HTTPS with secured log)
Declaration
Swift
public func setSecureModeEnabled(_ enabled: Bool, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
enabled/
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new identifier type
Declaration
Swift
public func setIdentifierType(_ identifierType: IdentifierTypeKey, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
identifierTypeIdentifierTypeKey
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Enable hash user id (SHA-256 with salt to ensure anonymity)
Declaration
Swift
public func setHashUserIdEnabled(_ enabled: Bool, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
enabled/
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new Plugin
Declaration
Swift
public func setPlugins(_ pluginNames: [PluginKey], sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
pluginNameslist of PluginKey
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Enable background task
Declaration
Swift
public func setBackgroundTaskEnabled(_ enabled: Bool, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
enabled/
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set new pixel path
Declaration
Swift
public func setPixelPath(_ pixelPath: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
pixelPathrequest path to get pixel
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Enable persistent identified visitor (identification data available for all sessions)
Declaration
Swift
public func setPersistentIdentifiedVisitorEnabled(_ enabled: Bool, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
enabled/
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new TvTracker URL
Declaration
Swift
public func setTvTrackingUrl(_ url: String, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
urlTVTTracking campaign url
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set duration of the visit duration
Declaration
Swift
public func setTvTrackingVisitDuration(_ visitDuration: Int, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
visitDurationduration of the visit
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new TVTTracking spot validity time
Declaration
Swift
public func setTvTrackingSpotValidityTime(_ time: Int, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
timetime during which campaign is valid
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Enable the campaign persistance
Declaration
Swift
public func setCampaignLastPersistenceEnabled(_ enabled: Bool, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
enabledstore last or first campaign
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new campaign lifetime
Declaration
Swift
public func setCampaignLifetime(_ lifetime: Int, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
lifetimecampaign lifetime
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set a new Session duration
Declaration
Swift
public func setSessionBackgroundDuration(_ duration: Int, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
durationDuration between two application openings after which a new session is started
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: @escaping ()->(String)) -> TrackerParameters
keyparameter key
valuestring parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: @escaping ()->(String), options: ParamOption) -> TrackerParameters
keyparameter key
valuestring parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: String) -> TrackerParameters
keyparameter key
valuestring parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: String, options: ParamOption) -> TrackerParameters
keyparameter key
valuestring parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Int) -> TrackerParameters
keyparameter key
valueint parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Int, options: ParamOption) -> TrackerParameters
keyparameter key
valueint parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Float) -> TrackerParameters
keyparameter key
valuefloat parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Float, options: ParamOption) -> TrackerParameters
keyparameter key
valuefloat parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Double) -> TrackerParameters
keyparameter key
valuedouble parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Double, options: ParamOption) -> TrackerParameters
keyparameter key
valuedouble parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Bool) -> TrackerParameters
keyparameter key
valuebool parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: Bool, options: ParamOption) -> TrackerParameters
keyparameter key
valuebool parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: [Any]) -> TrackerParameters
keyparameter key
valuearray parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: [Any], options: ParamOption) -> TrackerParameters
keyparameter key
valuearray parameter value
optionsparameter options
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: [String: Any]) -> TrackerParameters
keyparameter key
valuedictionary parameter value
Return Value
the current tracker
-
Add a parameter in the hit querystring
Declaration
Swift
public func setParam(_ key: String, value: [String: Any], options: ParamOption) -> TrackerParameters
keyparameter key
valuedictionary parameter value
optionsparameter options
Return Value
the current tracker
-
Remove a parameter from the hit querystring
Declaration
Swift
public func unsetParam(_ param: String)Parameters
paramtype
-
Remove the screen context: Use only for specific issue mark screenA, mark touchA, dont mark screenB, mark touchB. touchB will be no longer attached to screenA
Declaration
Swift
public func resetScreenContext()
-
Sends all tracking objects added
Declaration
Swift
public func dispatch()
-
Get the user id
Declaration
Swift
public func getUserId() -> StringReturn Value
the user id depending on configuration (uuid, idfv)
-
Set a custom user id
Declaration
Swift
public func setUserId(userId: String)Parameters
userIdthe userID. if hashUserId is enabled, the hash will be performed on this userID
-
Disable user identification.
Declaration
Swift
public class var doNotTrack: Bool
-
Set tracker crash handler Use only if you don’t already use another crash analytics solution Once enabled, tracker crash handler can’t be disabled until tracker instance termination
Declaration
Swift
public class var handleCrash: Bool
Tracker Class Reference