Basic Configuration
The SDK is configured using aZixflowConfig object with several options:
| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Zixflow API key |
logLevel | ZixflowLogLevel | No | Logging level (Debug, Info, Error, None) |
inApp | object | No | Enable in-app messaging (use empty object: {}) |
autoTrackDeviceAttributes | boolean | No | Automatically track device info |
trackApplicationLifecycleEvents | boolean | No | Automatically track app lifecycle |
screenViewUse | ScreenView | No | All or InApp screen-view behavior |
apiHost / cdnHost | string | No | Override API/CDN hosts for a first-party proxy |
location | object | No | Location module config (trackingMode) |
SDK Initialization
Initialize the SDK in yourApp.tsx or main component using useEffect:
Important: Initialize the SDK as early as possible in your app’s lifecycle, ideally in the root component’s useEffect.