trackEvent

fun trackEvent(category: String, semanticAttributes: Map<String, Any?>? = null, customAttributes: Map<String, Any?>? = null)

Track events.

Sample usage

Airbridge.trackEvent(
category = AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes = mapOf(
AirbridgeAttribute.PRODUCTS to listOf(
mapOf(
AirbridgeAttribute.PRODUCT_ID to "coca_1",
AirbridgeAttribute.NAME to "Coca cola",
AirbridgeAttribute.CURRENCY to "usd",
AirbridgeAttribute.PRICE to 1.99f,
AirbridgeAttribute.QUANTITY to 10,
AirbridgeAttribute.POSITION to 1
)
),
AirbridgeAttribute.IN_APP_PURCHASED to true,
AirbridgeAttribute.TRANSACTION_ID to "transaction_1",
AirbridgeAttribute.TOTAL_QUANTITY to 1000,
AirbridgeAttribute.QUERY to "SELECT * FROM beverages",
),
customAttributes = mapOf(
"custom_attribute_key" to "custom_attribute_value"
)
)

Parameters

category

The category of the event.

semanticAttributes

The semantic attributes of the event.

customAttributes

The custom attributes of the event.