On this page
Tracking
If you are currently using tracking from Firebase, you need to replace all of them and use tracking from the SDK system.
Send Tracking
Reference
com.ikame.android.sdk.tracking.IKTrackingHelper#sendTracking
Function Definition
fun sendTracking(
eventName: String,
vararg param: Pair<String, String?>
)
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
API Tracking
fun sendTrackingApi(
actionName: IKTrackingConst.ApiActionName,
apiName: String?,
endpoint: String?,
method: String?,
internetStatus: String?,
)
Trigger: When the client sends a request to the server. 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”).
fun sendTrackingApi(
actionName: IKTrackingConst.ApiActionName,
apiName: String?,
endpoint: String?,
method: String?,
responseCode: String?,
responseNull: String?,
responseDuration: String?,
)
Trigger:When the client receives a response from the server. 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”).