AnalyticsClient

@objc(PESDKAnalyticsClient)
public protocol AnalyticsClient : AnyObject

Consumers of analytics screen views and events must implement this protocol. You can then forward all screen views and events to an analytics service of your choice. To receive events you must register your AnalyticsClient instance with Analytics.addAnalyticsClient(_:).

  • This method is called when an analytics screen view occurs.

    Declaration

    Swift

    func logScreenView(_ screenView: PESDKAnalyticsScreenViewName) -> <<error type>>

    Parameters

    screenView

    The name of the screen view.

  • This method is called when an analytics event occurs.

    Declaration

    Swift

    func logEvent(_ event: PESDKAnalyticsEventName, attributes: [PESDKAnalyticsEventAttributeName : Any]?) -> <<error type>>

    Parameters

    event

    The name of the event.

    attributes

    The attributes associated with the event, if any.