configureProductAnalytics abstract method

  1. @Deprecated('Use start(startConfig: StartConfig.withEnvironmentId(...)) instead. ' 'This method will be removed in August 2026.')
Future<void> configureProductAnalytics({
  1. required String environmentId,
  2. ProductAnalyticsOptions options = const ProductAnalyticsOptions(),
})

Configures Product Analytics.

DEPRECATED: Use start with startConfig parameter instead.

This method must be called before start is called.

Note: If both configureProductAnalytics and start with startConfig are used, configureProductAnalytics takes precedence for backwards compatibility.

The environmentId parameter specifies the ID of the environment to which the data should be attributed to. The options parameter allows configuring additional parameters for Product Analytics.

Migration example:

// Old way (deprecated):
await CSQ().configureProductAnalytics(
  environmentId: 'your-env-id',
  options: ProductAnalyticsOptions(
    enableInteractionsAutocapture: true,
  ),
);
await CSQ().start();

// New way:
await CSQ().start(
  startConfig: StartConfig.withEnvironmentId(
    id: 'your-env-id',
    options: AnalyticsOptions(
      enableInteractionsAutocapture: true,
    ),
  ),
);

Implementation

@Deprecated(
    'Use start(startConfig: StartConfig.withEnvironmentId(...)) instead. '
    'This method will be removed in August 2026.')
Future<void> configureProductAnalytics({
  required String environmentId,
  ProductAnalyticsOptions options = const ProductAnalyticsOptions(),
});