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())
}
}

Functions

Link copied to clipboard
abstract fun trackEvent(eventName: String, parameters: Map<String, Any?>)

Trckr invoke this method to track event.