Skip to main content

track

The track method records custom events that users perform in your application.

Usage​

await client.track(user_id, event_name, properties)

Parameters​

NameTypeDescription
user_idstrUnique identifier for the user.
event_namestrName of the event being tracked (e.g., "Order Completed").
propertiesDict[str, Any]Dictionary of properties related to the event.

Example​

await client.track("u_001", "Plan Upgraded", {
"old_plan": "basic",
"new_plan": "pro",
"revenue": 29.99
})

Dual-Write Behavior​

If send_to_customer_io is enabled, the event and its properties will be mirrored to Customer.io using the track API.