Skip to main content

Full Configuration Options

final config = ZixflowConfig(
  // Required
  apiKey: 'YOUR_API_KEY',

  // Logging level
  logLevel: LogLevel.debug,  // error, info, debug

  // Auto-tracking options
  autoTrackDeviceAttributes: true,
  trackApplicationLifecycleEvents: true,

  // Screen tracking
  screenViewUse: ScreenView.all,  // all, inApp, none

  // Event batching
  flushAt: 20,          // Send events after 20 tracked
  flushInterval: 30,    // Or every 30 seconds

  // Custom endpoints (advanced)
  apiHost: 'custom-api.example.com',
  cdnHost: 'custom-cdn.example.com',

  // In-app messaging
  inAppConfig: InAppConfig(),

  // Push notifications
  pushConfig: PushConfig(
    // Push configuration options
  ),

  // Location tracking
  locationConfig: LocationConfig(),
);

await Zixflow.initialize(config: config);

Log Levels

Control SDK logging verbosity:
logLevel: LogLevel.error,  // Errors only
logLevel: LogLevel.info,   // Errors + informational
logLevel: LogLevel.debug,  // All messages (development)

Screen Tracking Options

screenViewUse: ScreenView.all,    // Track all screens
screenViewUse: ScreenView.inApp,  // Track only in-app screens
screenViewUse: ScreenView.none,   // Disable auto-tracking