start abstract method
Future<void>
start({
- StartConfig startConfig = const StartConfig.dxa(),
- 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:
- StartConfig.dxa for Digital Experience Analytics only (default)
- StartConfig.withEnvironmentId for Product Analytics with environment ID
- StartConfig.withDatasourceId for CSQ with data source ID
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,
});