This “track” method is used to track menu options which are selected by the user.
Method
@objc public func track(sender: Any, eventAction: EventAction, controller: UIViewController, characterKey: String = "", addGeo: Bool, viewName: String = "")
Parameters
sender - Action of the UI element.
eventAction - event ID based on the passing events which is defined in the SDK.
controller - The current view
characterKey - Character of the key pressed
addGeo - Flag used to decide whether to append the geo parameter(latitude and longitude) in the Payloads or Not.
viewName - This would be click,long press or onfocus names
Example
Tracker.shared.track(sender: sender, eventAction: .anOptionItemSelected, controller: self, addGeo: true, viewName: "Option Menu")