Mobile SDKv1.0.0MIT License
React Native SDK
@acai/react-native-sdk is backed by native iOS and Android modules via the React Native bridge. It supports session tracking, COPPA controls, and a middleware pipeline.
Installation
Initialise
Track events
Identify users
Config reference
The React Native SDK uses method-based configuration (no config object at init):
| Method | Description |
|---|---|
setServerUrl(url) | Override the collector endpoint. |
setOptOut(bool) | Disable all event tracking. |
setEventUploadThreshold(n) | Events before automatic flush. |
setEventUploadPeriodMillis(ms) | Time-based flush interval. |
setEventUploadMaxBatchSize(n) | Max events per request. |
trackingSessionEvents(bool) | Auto-track session start/end events. |
setMinTimeBetweenSessionsMillis(ms) | Session gap threshold in ms. |
enableCoppaControl() | Enable COPPA mode (disables IDFA collection). |
disableCoppaControl() | Disable COPPA mode. |
enableLogging(bool) | Toggle verbose SDK logging. |
addEventMiddleware(fn) | Add an event enrichment middleware function. |
