ClickstreamObjc
@objcMembers
public class ClickstreamObjc : NSObject
ClickstreamAnalytics api for objective-c
-
Init the Clickstream sdk
Declaration
Swift
public static func initSDK() throws
-
Init the Clickstream sdk
Declaration
Swift
public static func initSDK(_ configuration: ClickstreamConfiguration) throws
-
Use this method to record event
Declaration
Swift
public static func recordEvent(_ eventName: String)
Parameters
eventName
the event name
-
The method to record event with attributes
Declaration
Swift
public static func recordEvent(_ eventName: String, _ attributes: NSDictionary)
Parameters
eventName
the event name
attributes
the event attributes which type is NSDictionary
-
The method to record event with attributes and items
Declaration
Swift
public static func recordEvent(_ eventName: String, _ attributes: NSDictionary, _ items: [NSDictionary] = [])
Parameters
eventName
the event name
attributes
the event attributes which type is NSDictionary
items
the event items which type is NSDictionary
-
Use this method to send events immediately
Declaration
Swift
public static func flushEvents()
-
Add global attributes
Declaration
Swift
public static func addGlobalAttributes(_ attributes: NSDictionary)
Parameters
attributes
the global attributes to add
-
Delete global attributes
Declaration
Swift
public static func deleteGlobalAttributes(_ attributes: [String])
Parameters
attributes
the global attributes names to delete
-
Add user attributes
Declaration
Swift
public static func addUserAttributes(_ attributes: NSDictionary)
Parameters
attributes
the user attributes to add
-
Set user id for login and logout
Declaration
Swift
public static func setUserId(_ userId: String?)
Parameters
userId
current userId, nil for logout
-
Get Clickstream configuration, please config it after initialize sdk
Declaration
Swift
public static func getClickstreamConfiguration() throws -> ClickstreamConfiguration
Return Value
ClickstreamContextConfiguration to modify the configuration of clickstream sdk
-
Disable the SDK
Declaration
Swift
public static func disable()
-
Enable the SDK
Declaration
Swift
public static func enable()