ApplicationSession

public protocol ApplicationSession

Undocumented

  • The configuration used to initialise Analytics reporter.

    Declaration

    Swift

    var configurations: [Configuration]? { get }
  • The delegate to receive messages and failures from analytics reporter.

    Declaration

    Swift

    var delegate: AnalyticsDelegate? { get set }
  • Initialise FLAnalytics library with a single Configuration.

    Default Implementation

    Declaration

    Swift

    @available(*, deprecated, message: "This API has been deprecated. Please use `initialize(configurations: commonData: configEndPoint: delegate: completion:﹚` instead.")
    func initialize(configuration: Configuration, commonData: CommonReportingData, configEndPoint: String?, delegate: AnalyticsDelegate, completion: @escaping (Result<Bool, Error>) -> Void)
  • Initialise FLAnalytics library with support multiple configurations.

    Default Implementation

    Declaration

    Swift

    func initialize(configurations: [Configuration], commonData: CommonReportingData, configEndPoint: String?, delegate: AnalyticsDelegate, completion: @escaping ([InitializationResponse]) -> Void)
  • API to report app start

    Declaration

    Swift

    func start(value: ApplicationMetrics)
  • To create playback session. Create this session whenever a playback is requested by the user. Hold this instance throughout the playback. Clear the object while cleanup the player instance

    Declaration

    Swift

    func createPlaybackSession() -> PlaybackSession?
  • Initializes analytics optimized reporting using the provided throttling configuration.

    Default Implementation

    Declaration

    Swift

    func initializeAnalyticsThrottling(httpClient: HTTPClient, analyticsThrottlerConfiguration: AnalyticsThrottlerConfiguration)
  • To create user session with user information. Use this session to report user related events.

    Declaration

    Swift

    func createUserSession() -> UserSession
  • API to report download events. Use this api to initiate download reporting. FLAnalytics will report downloads.

  • To report any application action errors

    Declaration

    Swift

    func addErrorEvent(error: FLError)
  • Use this API to report custom events.

    Declaration

    Swift

    func addEvent(value: CustomEvent)
  • Use this API add global metadata to report across all events.

    Declaration

    Swift

    func updateMetadataRecord(metadata: [String : Any])
  • Sets custom dimension values for both content and ads. These dimensions are included in all analytics events for content and ads. If replicateContentToAd is true, content dimensions are also applied to ad events.

    This API is supported only for the NPAW Analytics provider. For any other provider, the dimensions are ignored.

    Default Implementation

    Declaration

    Swift

    func setCustomDimensions(content: [Int : String], ad: [Int : String]?, replicateContentToAd: Bool)

    Parameters

    content

    Content dimensions, reported with all content-related events. Keys must be in the range 1…20.

    ad

    Ad dimensions, reported with all ad-related events. Keys must be in the range 1…10.

    replicateContentToAd

    When true, applies content dimensions to ad events as well. If a key exists in both content and ad dimensions, the ad value takes precedence. Default value is false.

  • stop(error:) Default implementation

    API to report when the application teriminated.

    Default Implementation

    Declaration

    Swift

    func stop(error: FLError?)