Skip to main content

Log Levels

Control SDK logging for debugging:
import { Zixflow, ZixflowLogLevel } from 'zixflow-reactnative';

const config = {
  apiKey: 'YOUR_API_KEY',
  logLevel: ZixflowLogLevel.Debug,  // Debug, Info, Error, None
};

Zixflow.initialize(config);
Log levels:
  • ZixflowLogLevel.Debug - Verbose logging (development)
  • ZixflowLogLevel.Info - Informational messages
  • ZixflowLogLevel.Error - Errors only
  • ZixflowLogLevel.None - No logging (production)

Auto-Tracking Options

Configure automatic tracking features:
import { Zixflow, ScreenView } from 'zixflow-reactnative';

const config = {
  apiKey: 'YOUR_API_KEY',

  // Automatically track device attributes (OS, model, app version)
  autoTrackDeviceAttributes: true,

  // Automatically track app lifecycle events (open, close, background)
  trackApplicationLifecycleEvents: true,

  // How screen views are used for analytics and in-app targeting
  screenViewUse: ScreenView.All, // or ScreenView.InApp
};

Zixflow.initialize(config);

Custom API Hosts

Override API endpoints for testing or custom infrastructure:
import { Zixflow } from 'zixflow-reactnative';

const config = {
  apiKey: 'YOUR_API_KEY',

  // Route SDK traffic through a first-party proxy
  apiHost: 'https://custom-api.zixflow.com',
  cdnHost: 'https://custom-cdn.zixflow.com',

  // Enable in-app messaging
  inApp: {},
};

Zixflow.initialize(config);

Push click behavior (Android)

import { Zixflow, PushClickBehaviorAndroid } from 'zixflow-reactnative';

const config = {
  apiKey: 'YOUR_API_KEY',
  push: {
    android: {
      pushClickBehavior: PushClickBehaviorAndroid.ActivityPreventRestart,
    },
  },
};

Zixflow.initialize(config);