enableAutoTrack method

void enableAutoTrack(
  1. List<ThinkingAnalyticsAutoTrackType> autoTrackTypes
)

Enable auto track events.

You can enable auto tracking by calling the method with autoTrackTypes, which is a List of ThinkingAnalyticsAutoTrackType. If you need to set your own distinct ID or super properties, please do that before enable auto tracking.

Implementation

void enableAutoTrack(List<ThinkingAnalyticsAutoTrackType> autoTrackTypes) {
  // ignore: unnecessary_null_comparison
  if (null != autoTrackTypes) {
    _channel.invokeMethod('enableAutoTrack', <String, dynamic>{
      'appId': _appId,
      'types': autoTrackTypes.map((e) => e.index).toList(),
    });
  }
}