AnalyticsConfig

class AnalyticsConfig(id: String, upload: AnalyticsConfig.UploadConfig = UploadConfig(), storage: AnalyticsConfig.StorageConfig = StorageConfig())(source)

Configuration object for the Analytics subsystem.

If this object is not provided to the `DigitalFlyer`, the analytics subsystem will not initialize because it requires a non-empty id. The value of the non-empty id is chosen by the caller, depending on their requirements/usage/privacy policies.

A non-exhaustive list of candidate IDs are below:

DigitalFlyer-lifetime ID (i.e. init(id: UUID().uuidString)): Ephemeral; tracks analytics for user until `DigitalFlyer` is re-created App session ID (i.e. a cached UUID().uuidString): Tracks analytics for user until next launch of the app Vendor ID (i.e.identifierForVendor): Tracks analytics for user until all vendor apps are uninstalled Advertising ID (i.e. advertisingIdentifier): Tracks analytics until user resets ID. Requires App Tracking Transparency and user consent A logged in user's ID: Tracks analytics while user is authenticated with host App

Constructors

Link copied to clipboard
constructor(id: String, upload: AnalyticsConfig.UploadConfig = UploadConfig(), storage: AnalyticsConfig.StorageConfig = StorageConfig())

Types

Link copied to clipboard
class StorageConfig(eventCapacity: Int)

Configuration for event storage/buffering

Link copied to clipboard
class UploadConfig(pollInterval: Long, uploadInterval: Long, eventCount: Int = 50, batchCount: Int = 50)

Properties

Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard