pod 'UserX', '~> 1.0.0'
pod install
import UserX
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UserX.initialize(withAppKey: "YOUR_APP_KEY")
return true
}
UserX.setLogLevel(.debug)
UserX.enableAutomaticSessionTracking(true)
UserX.logEvent("purchase", parameters: ["item_id": "12345", "price": 9.99])
UserX.setUserProperty("age", value: "25")
UserX.setUserProperty("gender", value: "female")
import UserX
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UserX.initialize(withAppKey: "YOUR_APP_KEY")
return true
}
UserX.logEvent("registration", parameters: ["method": "email"])
UserX.logEvent("purchase", parameters: ["item_id": "12345", "price": 9.99])
UserX.logEvent("feature_use", parameters: ["feature_name": "chat"])