How It Works
TheEventService queues events in memory and flushes them in batches of 20 every 30 seconds:
track()adds an event to the pending queue- When the queue reaches 20 events, it flushes immediately
- Every 30 seconds, any pending events are flushed
- If a flush fails, events are persisted to AsyncStorage and retried on next init
- On
StackfrontProviderunmount, the flush timer stops; pending events remain persisted in AsyncStorage and are replayed on next init
Automatic Events
Supported Event Types
The events API keeps an allow-list and silently drops any event type not on it. The exact supported set is:Custom Events
Event Shape
sessionId is generated once when the provider mounts and persists for the app session.
Identity & attribution
The provider wires the player id (from push registration) and the customer id (from login) into the event queue automatically — every tracked event carries them when available, with no extra work from the host app. The backend usesoneSignalPlayerId for distinct-user and realtime “active users” counts and
customerId to tie activity to a customer; events tracked before push
registration or login simply omit the fields.
Service API
Best Practices
- Use descriptive event names in
snake_case - Limit properties to primitive types and flat structures
- Avoid tracking personally identifiable information (PII) in properties
- The event pipeline is fire-and-forget — errors are silently handled and retried

