Configuration
react-nativeDeveloper
Every option accepted by ScaleBun.init(), generated from SimplifiedInitConfig.
init() accepts a single config object. This table is generated from the SimplifiedInitConfig interface in the SDK source, so it cannot drift from the code.
Minimal setup#
App.tsxTypeScript
import ScaleBun from '@scalebun/react-native';
await ScaleBun.init({
clientKey: '<YOUR_CLIENT_KEY>',
appId: '<YOUR_APP_ID>',
});All options#
Exactly one of these two is required: clientKey alone (SaaS mode), or
both modes — it defaults to ScaleBun's cloud API.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Conditional — with publishableKey, unless clientKey is set | — | Project ID from dashboard |
publishableKey | string | Conditional — with projectId, unless clientKey is set | — | Publishable API key from dashboard |
desktopDebug | DebugConnectionConfig | No | — | Desktop debug connection. |
debug | DebugConnectionConfig | No | — | — |
sessionReplay | boolean | No | true | Enable session replay capture. |
privacy | PrivacyConfig | No | — | SDK-wide privacy settings |
features | ScaleBunFeatures | No | — | Feature opt-out flags — see "Feature opt-out" below for which are entitlement- or native-setup-gated |
verbose | boolean | No | false | Enable verbose SDK logging. |
flushIntervalMs | number | No | 5000 | Event flush interval in ms. |
maxQueueSize | number | No | 1000 | Max events per flush batch. |
performance | PerformanceFlags | No | — | Performance pipeline activation flags (tiered, default-safe). |
appId | string | No | — | Dashboard App ID. Required to enable the envelope event-tracking lane. |
clientKey | string | Conditional — required unless projectId+publishableKey are set | — | SDK client key (SaaS mode). Also used to authenticate the envelope lane. |
platform | 'ios' | 'android' | 'web' | 'react_native' | No | react_native | Platform override: ios | android | web | react_native. |
eventTracking | boolean | No | true when appId is present | Enable the Phase 1 envelope tracking lane (first_open/app_open/session_start/ track/identify/trackPurchase → /v1/batch). |
automaticEventTracking | boolean | No | — | Upload zero-instrumentation screen, deep-link, interaction, push, and Engage events. Direct ScaleBun.init() integrations must opt in; the application- level ScaleBunProvider enables it by default. |
autoLifecycleEvents | boolean | No | true | Auto-emit first_open/app_open/session_start on init. |
Feature opt-out#
Core monitoring and analytics capabilities (session replay, network monitoring, crash
reporting, performance) are enabled after initialization and can be switched off via
features. OTA and select advanced capabilities require explicit setup, native
configuration, or plan entitlement — they are not part of this opt-out set.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
replay | boolean | No | true | Enable session replay capture. |
network | boolean | No | true | Enable network request monitoring. |
crashes | boolean | No | true | Enable crash reporting. |
session | boolean | No | true | Enable unified session tracking. |
journey | boolean | No | true | Enable user journey tracking. |
performance | boolean | No | true | Enable native performance monitoring. |
Privacy#
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
redactAuth | boolean | No | true | Redact Authorization headers in network capture. |
redactCookies | boolean | No | true | Redact Cookie headers in network capture. |
redactBodies | boolean | No | false | Redact request/response bodies in network capture. |
maskTextInputs | boolean | No | false | Mask text input values in session replay. |
maskImages | boolean | No | false | Mask image content in session replay. |