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 } -
initialize(configuration:Default implementationcommonData: configEndPoint: delegate: completion: ) 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) -
initialize(configurations:Default implementationcommonData: configEndPoint: delegate: completion: ) 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? -
initializeAnalyticsThrottling(httpClient:Default implementationanalyticsThrottlerConfiguration: ) 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]) -
setCustomDimensions(content:Default implementationad: replicateContentToAd: ) 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
contentContent dimensions, reported with all content-related events. Keys must be in the range 1…20.
adAd dimensions, reported with all ad-related events. Keys must be in the range 1…10.
replicateContentToAdWhen 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?)