Skip to main content

Analytics

The LikeMinds SDK provides a set of predefined user events that you might want to track for your feed application.

Refer to Analytics Events to see the list of events that are being tracked.

Callback

To receive these analytics events and handle them according to your requirements implement LMFeedCoreCallback.

While setting up LikeMinds Feed SDK in onCreate() method of the Application class, extend LMFeedCoreCallback and pass the instance of the same in LMFeedCore.setup().

interface LMFeedCoreCallback{
fun trackEvent(eventName: String, eventProperties: Map<String, String?> = mapOf()) // will be triggered when an event is called.
}
  • eventName: Name of the event triggered.
  • eventProperties : All the properties associated with that particular event.

Example Implementation

val application = this
val enablePushNotifications = false
val deviceId = null
val domain = "ENTER YOUR DOMAIN NAME HERE"

val lmFeedCoreCallback = object : LMFeedCoreCallback {
override fun trackEvent(eventName: String, eventProperties: Map<String, String?>) {
// your implementation for analytics
}
}

LMFeedCore.setup(
application = application,
enablePushNotifications = enablePushNotifications,
deviceId = deviceId,
domain = domain,
lmFeedCoreCallback = lmFeedCoreCallback
)