Skip to main content

Event Tracking

sdk.logEvent("button_clicked")

sdk.logEvent(
name = "purchase_completed",
properties = mapOf("order_id" to "ord_789", "total" to 3000)
)

Blank names and names longer than 255 characters are rejected with a warning. Property values must be JSON-compliant. Date values are converted to UTC ISO-8601 strings; unsupported types (custom objects, NaN, infinities) are dropped with a warning.

Item Properties​

itemProperties carries row-level data (cart lines, search results) and ships as item_properties:

sdk.logEvent(
name = "add_to_cart",
properties = mapOf("total" to 3000, "currency" to "USD"),
itemProperties = listOf(
mapOf("id" to "SKU-123", "name" to "Running Shoes", "price" to 2850),
mapOf("id" to "SKU-456", "name" to "Socks", "price" to 150)
)
)