ClickstreamAnalytics

public enum ClickstreamAnalytics

ClickstreamAnalytics api for swift

  • Init ClickstreamAnalytics

    Declaration

    Swift

    public static func initSDK(_ configuration: ClickstreamConfiguration? = nil) 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 ClickstreamAttribute

    Declaration

    Swift

    public static func recordEvent(_ eventName: String,
                                   _ attributes: ClickstreamAttribute,
                                   _ items: [ClickstreamAttribute] = [])

    Parameters

    eventName

    the event name

    attributes

    the event attributes

  • Use this method to send events immediately

    Declaration

    Swift

    public static func flushEvents()
  • Add global attributes

    Declaration

    Swift

    public static func addGlobalAttributes(_ attributes: ClickstreamAttribute)

    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: ClickstreamAttribute)

    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()

    Parameters

    userId

    current userId, nil for logout

  • Enable the SDK

    Declaration

    Swift

    public static func enable()

    Parameters

    userId

    current userId, nil for logout

  • ClickstreamAnalytics preset events

    See more

    Declaration

    Swift

    public enum EventName
  • ClickstreamANalytics preset attributes

    See more

    Declaration

    Swift

    public enum Attr
  • ClickstreamAnalytics preset item attributes In addition to the item attributes defined below, you can add up to 10 custom attributes to an item.

    See more

    Declaration

    Swift

    public enum Item