This “track” method is used to track the user’s key event.
Method
@objc public func track(sender: Any, eventAction: EventAction, controller: UIViewController, characterKey: String = "", addGeo: Bool, viewName: String = "")
Parameters
sender - Action of the current 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 name of click,long press or onfocus
Example
Tracker.shared.track(sender: textField, eventAction: .onKeyPress, controller: self, characterKey: string, addGeo: getGPSStatus())