TrackerAdapter
interface TrackerAdapter
Implementation of this interface encapsulates all tracking logic to specific service.
Adapter should be registered when you create a tracker by calling createExampleTracker { addAdapter(ExampleAdapterImpl()) }
Example adapter:
class FirebaseAdapter : TrackerAdapter {
private val firebaseTracker = Firebase.analytics
override fun trackEvent(eventName: String, parameters: Map<String, Any?>) {
firebaseTracker.logEvent(eventName, parameters.toBundle())
}
}
Content copied to clipboard