start abstract method

Future<void> start({
  1. StartConfig startConfig = const StartConfig.dxa(),
  2. CSQMaskingConfig? maskingConfig,
})

Starts the SDK.

This method should be called as early as possible in the app's lifecycle.

The startConfig parameter configures the SDK mode. Use:

The maskingConfig parameter sets the global SessionReplay masking configuration. If not provided, the default masking configuration will be used. For more information, see the documentation.

Example:

// DXA only (default):
await CSQ().start();
// or explicitly:
await CSQ().start(startConfig: StartConfig.dxa());

// Product Analytics with environment ID:
await CSQ().start(
  startConfig: StartConfig.withEnvironmentId(
    id: 'your-env-id',
    options: AnalyticsOptions(
      enableInteractionsAutocapture: true,
    ),
  ),
);

// Product Analytics with data source ID (UCH / remote config):
await CSQ().start(
  startConfig: StartConfig.withDatasourceId(
    id: 'your-datasource-id',
  ),
);

Implementation

Future<void> start({
  StartConfig startConfig = const StartConfig.dxa(),
  CSQMaskingConfig? maskingConfig,
});