Capture analytics
Track product events and customer traits with the Voidhash SDK.
The SDK attributes events to the current person and sends them in background batches. No separate analytics package is required.
Capture an event
voidhash.capture(
"upgrade_button_clicked",
mapOf("source" to "settings", "plan" to "monthly"),
)Use clear, stable event names. Names beginning with $ are reserved for Voidhash events.
Automatic events
The SDK records common lifecycle events for you:
$app_installed$app_updated$app_opened$app_backgrounded$app_became_active$sign_out
Flush before a boundary
Events flush automatically in batches (20 per request or every 5 seconds, retried with exponential
backoff, honoring Retry-After). Force delivery when the app is about to cross an important
boundary:
voidhash.flush()Sends every queued analytics event.
Update customer traits
See Set customer attributes — trait updates ride the same pipeline as analytics events.