Tracking in app
If you are currently using tracking from Firebase, you need to replace all of them and use tracking from the SDK system.
Class Index com.ikame.android.sdk.tracking.IKTrackingHelper
sendTracking
sendTracking(eventName: String, vararg param: Pair<String, String?>)
OR
sendTracking(eventName: String, bundle: Bundle)
Parameters:
-
eventName
: The name of the event you want to track. -
param
: Optional parameters to provide additional details about the event. Each parameter is a key-value pair where the key is a String describing the parameter, and the value is a nullable String containing the parameter’s value.
Sample usage
logCrash
In the Crashlytics dashboard, you can click into an issue and get a detailed event report. Use this function to report exceptions to Crashlytics.

fun logCrash(message: String, throwable: Throwable)
sendTrackingPermission
Trigger: Sends tracking information related to permission events.
fun sendTrackingPermission(
actionName: IKTrackingConst.PermissionActionName,
from: String?,
permissionName: String?,
status: IKTrackingConst.PermissionStatus?
)
Parameters:
-
actionName
The action name for the permission event. -
from
The source or context of the permission request (e.g., “popup”). -
permissionName
The name of the permission being requested. -
status
The status of the permission (e.g., “yes”, “no”).
OR
fun sendTrackingPermission(
actionName: IKTrackingConst.PermissionActionName,
from: String?,
permissionName: String?
)
Parameters:
-
actionName
The action name for the permission event. -
from
The source or context of the permission request (e.g., “popup”). -
permissionName
The name of the permission being requested.
sendTrackingNotification
Trigger: Sends tracking information related to notification events.
fun sendTrackingNotification(
actionName: IKTrackingConst.NotificationActionName,
notifyType: String?,
notifyContent: String?
)
Parameters:
-
actionName
The action name for the notification event. -
notifyType
The type of notification. -
notifyContent
The content of the notification.
sendTrackingFeedback
Trigger: Sends tracking information related to feedback events.
fun sendTrackingFeedback(
actionName: IKTrackingConst.FeedbackActionName,
value: String?
)
Parameters:
-
actionName
The action name for the feedback event. -
value
The feedback value.
setCrashlyticsCustomKeys
Trigger: Sets custom keys for Crashlytics reporting.
fun setCrashlyticsCustomKeys(vararg param: Pair<String, Any>)
Parameters:
param
Pairs of key-value pairs to be set as custom keys.
sendTrackingApi
Trigger: Sends tracking information related to API events.
fun sendTrackingApi(
actionName: IKTrackingConst.ApiActionName,
apiName: String?,
endpoint: String?,
method: String?,
internetStatus: String?,
)
Parameters:
-
actionName
The action name for the API event. -
apiName
The name of the API (e.g., “chat_ai”, “plant_identify”, “phone_tracker”). -
endpoint
The URL of the API (e.g., “api/auth/local”). -
method
The HTTP method of the API (e.g., “GET”, “POST”, “DELETE”, “PUT”, “PATCH”, “OPTIONS”). -
internetStatus
The status of the internet connection (e.g., “yes”, “no”).
OR
fun sendTrackingApi(
actionName: IKTrackingConst.ApiActionName,
apiName: String?,
endpoint: String?,
method: String?,
responseCode: String?,
responseNull: String?,
responseDuration: String?,
)
Parameters:
-
actionName
The action name for the API event. -
apiName
The name of the API (e.g., “chat_ai”, “plant_identify”, “phone_tracker”). -
endpoint
The URL of the API (e.g., “api/auth/local”). -
method
The HTTP method of the API (e.g., “GET”, “POST”, “DELETE”, “PUT”, “PATCH”, “OPTIONS”). -
responseCode
The HTTP status code returned by the API (e.g., “200”, “400”, “401”). -
responseNull
Indicates whether the response is null (e.g., “yes”, “no”). -
responseDuration
The duration of the API call in milliseconds (e.g., “12345”).
sendTrackingUserInfo
Trigger: Sends tracking information related to User Info events.
fun sendTrackingUserInfo(
actionName: IKTrackingConst.InfoActionName,
groupAge: String?,
gender: String?,
favorite: String?,
)
Parameters:
-
actionName
The action name for the User Info event. -
groupAge
The age group of the user (e.g., “13”, “14”, “15”). -
gender
The gender of the user (e.g., “male”, “female”, “other”). -
favorite
The favorite of the user (e.g., “reading”, “hiking”).