AnalyticsProviderProtocol
@objc
public protocol AnalyticsProviderProtocol : PluginAdapterProtocol
Conforming this protocol allows Zapp Analytics plugin to support generic analytics system of Zapp App
-
Invokation of this function must send event to analytics provider
Declaration
Swift
@objc func sendEvent(_ eventName: String, parameters: [String : Any]?)
Parameters
eventName
Unique event name that used as event key
parameters
Dictionary that should be passed as values for specific event
-
Invokation of this function must send screen event to analytics provider
Note
If plugin does not support screen events, logic can be passed default event with parametersDeclaration
Swift
@objc func sendScreenEvent(_ screenName: String, parameters: [String : Any]?)
Parameters
screenName
Unique screen name
parameters
Dictionary that should be passed as values for specific event
-
Invokation of this method will notify analytics plugin that timed event was started Plugin should wait until stopObserveTimedEvent: will be called
Declaration
Swift
@objc optional func startObserveTimedEvent(_ eventName: String, parameters: [String : Any]?)
Parameters
eventName
Unique event name that used as event key
parameters
Dictionary that should be passed as values for specific event
-
Invokation of this method will notify analytics plugin that timed event was finished Call of this method should send timed event to analytics provider
Declaration
Swift
@objc optional func stopObserveTimedEvent(_ eventName: String, parameters: [String : Any]?)
Parameters
eventName
Unique event name that used as event key
parameters
Dictionary that should be passed as values for specific event
-
Track campaign from URL
Declaration
Swift
@objc optional func trackCampaignParamsFromUrl(_ url: NSURL)
Parameters
url
url to track campaign