Enables or disables analytics tracking for the SDK.
Syntax
Future<void> setAnalyticsEnabled(bool analyticsEnabled)
Parameters
analyticsEnabled(bool) -trueto enable analytics,falseto disable
Returns
Future<void>- Completes when the analytics setting has been updated.
Example
try {
await SfmcSdk.setAnalyticsEnabled(true);
print('Analytics enabled');
} catch (e) {
print('Failed to set analytics: $e');
}