StartConfig class sealed
Base sealed class for SDK start configuration.
Use one of the factory constructors to configure the SDK:
- StartConfig.dxa for Digital Experience Analytics only
- StartConfig.withEnvironmentId for Product Analytics with environment ID
- StartConfig.withDatasourceId for Product Analytics with data source ID
Use when for exhaustive handling of all configuration variants.
Example usage:
// DXA only (default)
await CSQ().start();
// or explicitly:
await CSQ().start(startConfig: StartConfig.dxa());
// PA with environment ID
await CSQ().start(
startConfig: StartConfig.withEnvironmentId(
id: 'your-env-id',
options: AnalyticsOptions(enableInteractionsAutocapture: true),
),
);
// CSQ with data source ID
await CSQ().start(
startConfig: StartConfig.withDatasourceId(
id: 'your-datasource-id',
),
);
Constructors
- StartConfig.dxa()
-
Creates a DXA-only configuration (no Product Analytics).
constfactory
- StartConfig.withDatasourceId({required String id, AnalyticsOptions options = const AnalyticsOptions()})
-
Creates a Product Analytics configuration with data source ID.
factory
- StartConfig.withEnvironmentId({required String id, AnalyticsOptions options = const AnalyticsOptions()})
-
Creates a Product Analytics configuration with environment ID.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
T> ({required T dxa(), required T withEnvironmentId(String id, AnalyticsOptions options), required T withDatasourceId(String id, AnalyticsOptions options)}) → T - Process this config based on its type.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited