provider

fun provider(name: String, events: EventTrackerService? = null, properties: PropertyTrackerService? = null, identity: IdentifiableUserService? = null, lifecycle: AnalyticsLifecycleService? = null, consent: ConsentService? = null)(source)

Adds one vendor. Pass only the capabilities it has — an adapter that implements several of them is the same object passed under each.

name appears in every failure handed to the error reporter, so use something you would recognise in a crash report.

Which events reach a vendor is decided by that adapter's factory chain. To gate, sample or debounce, wrap the capability — EventTrackerService is a fun interface:

provider(name = "adjust", events = EventTrackerService { if (it !is PiiEvent) adjust.track(it) })