Tracker
public class Tracker : NSObject
Wrapper class for tracking usage of your application
-
Tracker current delegate
Declaration
Swift
@objc public var delegate: TrackerDelegate? { get set } -
Sets Tracker in debug mode and display debugger window
Declaration
Swift
@objc public var enableDebugger: Bool { get set }
-
Return Offline instance
Declaration
Swift
@objc fileprivate(set) public lazy var offline: Offline { get set }
-
Return Context instance
Declaration
Swift
@objc fileprivate(set) public lazy var context: Context { get set }
-
Return NuggAd instance
Declaration
Swift
@objc fileprivate(set) public lazy var nuggAds: NuggAds { get set }
-
Return GPS tracking instance
- Deprecated : location is now only available as a screen object property.
Declaration
Swift
@available(*, deprecated, message: "location is now only available as a screen object property (> 2.5.0﹚.") @objc fileprivate(set) public lazy var locations: Locations { get set }
-
Return Publisher instance
Declaration
Swift
@objc fileprivate(set) public lazy var publishers: Publishers { get set }
-
Return SelfPromotions instance
Declaration
Swift
@objc fileprivate(set) public lazy var selfPromotions: SelfPromotions { get set }
-
Return Identified visitor instance
Declaration
Swift
@objc fileprivate(set) public lazy var identifiedVisitor: IdentifiedVisitor { get set }
-
Get Screens instances
Declaration
Swift
@objc fileprivate(set) public lazy var screens: Screens { get set }
-
Dynamic Screen tracking
Declaration
Swift
@objc fileprivate(set) public lazy var dynamicScreens: DynamicScreens { get set }
-
Return gestures instance
Declaration
Swift
@objc fileprivate(set) public lazy var gestures: Gestures { get set }
-
Return CustomObjects instance
Declaration
Swift
@objc fileprivate(set) public lazy var customObjects: CustomObjects { get set }
-
Return ECommerce instance
Declaration
Swift
@objc fileprivate(set) public lazy var ecommerce: ECommerce { get set }
-
Return Events instance
Declaration
Swift
@objc fileprivate(set) public lazy var events: Events { get set }
-
Return CustomVar instance
- Deprecated : customVars is now only available as a screen object property.
Declaration
Swift
@available(*, deprecated, message: "customVars is now only available as a screen object property (> 2.5.0﹚.") @objc fileprivate(set) public lazy var customVars: CustomVars { get set }
-
Return Order instance
Declaration
Swift
@objc fileprivate(set) public lazy var orders: Orders { get set }
-
Return Aisle instance
- Deprecated : aisles is now only available as a screen object property.
Declaration
Swift
@available(*, deprecated, message: "aisles is now only available as a screen object property (> 2.5.0﹚.") fileprivate(set) public lazy var aisles: Aisles { get set }
-
Return Cart instance
Declaration
Swift
@objc fileprivate(set) public lazy var cart: Cart { get set }
-
Return Products instance
Declaration
Swift
@objc fileprivate(set) public lazy var products: Products { get set } -
Campaign Tracking. Campaign is now available as a screen object property but you may use this method for notification tracking
Declaration
Swift
@objc fileprivate(set) public lazy var campaigns: Campaigns { get set }
-
Return InternalSearch instance
- Deprecated : internalSearch is now only available as a screen object property.
Declaration
Swift
@available(*, deprecated, message: "internalSearch is now only available as a screen object property (> 2.5.0﹚.") @objc fileprivate(set) public lazy var internalSearches: InternalSearches { get set }
-
Return CustomTreeStructures instance
- Deprecated : customTreeStructures is now only available as a screen object property.
Declaration
Swift
@available(*, deprecated, message: "customTreeStructures is now only available as a screen object property (> 2.5.0﹚.") @objc fileprivate(set) public lazy var customTreeStructures: CustomTreeStructures { get set }
-
Return MediaPlayers instance
Declaration
Swift
@objc fileprivate(set) public lazy var mediaPlayers: MediaPlayers { get set } -
Campaign Tracking. Campaign is now available as a screen object property but you may use this method for notification tracking
Declaration
Swift
@objc fileprivate(set) public lazy var mvTestings: MvTestings { get set }
-
Initialisation with default configuration
Declaration
Swift
public convenience override init() -
Initialisation with a custom configuration
Declaration
Swift
@objc public init(configuration: [String : String])Parameters
configurationmap that contains key/values. See TrackerConfigurationKeys
-
Get the current configuration (read-only)
Declaration
Swift
@objc public var config: [String : String] { get } -
Set a new configuration
Declaration
Swift
@objc 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 MUST 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
@objc 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
@objc 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
@objc 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
@objc 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
@objc 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
@objc 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
@objc 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
-
Enable ignore limited ad tracking
Declaration
Swift
@objc public func setIgnoreLimitedAdTrackingEnabled(_ 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
-
Enable send hits when opt out
Declaration
Swift
@objc public func setSendHitWhenOptOutEnabled(_ 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
@objc 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
-
Ensures that all hits are sent only in foreground if set to true. (default: false)
Declaration
Swift
@available(*, deprecated, message: "use setSendOnApplicationState instead") @objc public func setSendOnlyWhenAppActive(_ 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
-
Ensures that all hits are sent only in allowed states
Declaration
Swift
public func setSendOnApplicationState(_ state: SendApplicationState, sync: Bool = false, completionHandler: ((_ isSet: Bool) -> Void)?)Parameters
stateallowed state to send hit
syncperform the operation synchronously (optional, default: false)
completionHandlercalled when the operation has been done
-
Set new pixel path
Declaration
Swift
@objc 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
@objc 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
-
Enable the campaign persistance
Declaration
Swift
@objc 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
@objc 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
@objc 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
@discardableResult @objc 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
@discardableResult @objc 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
@discardableResult @objc(setStringParam:value:) 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
@discardableResult @objc(setStringParam:value:options:) 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
@discardableResult @objc(setIntParam:value:) 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
@discardableResult @objc(setIntParam:value:options:) 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
@discardableResult @objc(setFloatParam:value:) 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
@discardableResult @objc(setFloatParam:value:options:) 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
@discardableResult @objc(setDoubleParam:value:) 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
@discardableResult @objc(setDoubleParam:value:options:) 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
@discardableResult @objc(setBoolParam:value:) 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
@discardableResult @objc(setBoolParam:value:options:) 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
@discardableResult @objc(setArrayParam:value:) 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
@discardableResult @objc(setArrayParam:value:options:) 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
@discardableResult @objc(setDictionaryParam:value:) 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
@discardableResult @objc(setDictionaryParam:value:options:) 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
@objc 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
@objc public func resetScreenContext()
-
Sends all tracking objects added
Declaration
Swift
@objc public func dispatch()
-
Get the user id
Declaration
Swift
@objc public func getUserId() -> StringReturn Value
the user id depending on configuration (uuid, idfv)
-
Set a custom user id
Declaration
Swift
@objc public func setUserId(userId: String)Parameters
userIdthe userID. if hashUserId is enabled, the hash will be performed on this userID
-
Get lifecycle metrics
Declaration
Swift
@objc public func getLifecycleMetrics() -> [String : Any]Return Value
the map which contains lifecycle metrics computed by the SDK
-
Get last crash informations
Declaration
Swift
@objc public func getCrashInformation() -> [String : Any]Return Value
the map which contains lifecycle metrics computed by the SDK
-
Disable user identification.
Declaration
Swift
@available(*, deprecated, message: "Use ATInternet.optOut instead") @objc public class var optOut: Bool { get set } -
Disable user identification.
Declaration
Swift
@available(*, deprecated, message: "Use ATInternet.optOut instead") @objc public class var doNotTrack: Bool { get set }
-
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
@objc public class var handleCrash: Bool { get set }
Tracker Class Reference