TDAnalytics class

The packaging class of ThinkingAnalyticsSDK provides static methods, which is more convenient for customers to use

Constructors

TDAnalytics()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
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

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calibrateTime(int timestamp) → void
time calibration with timestamp
calibrateTimeWithNtp(String ntpServer) → void
time calibration with ntp
clearSuperProperties({String? appId}) → void
Clear all public event attributes.
enableAutoTrack(int autoTrackEventType, {Map<String, dynamic>? autoTrackEventProperties, String? appId}) → void
Enable the auto tracking function with properties
enableLog(bool enableLog) → void
enable debug logging
enableThirdPartySharing(int type, {Map<String, dynamic>? extras, String? appId}) → void
Enable three-party data synchronization.
flush({String? appId}) → void
Empty the cache queue. When this function is called, the data in the current cache queue will attempt to be reported. If the report succeeds, local cache data will be deleted.
getDeviceId({String? appId}) Future<String?>
Obtain the device ID.
getDistinctId({String? appId}) Future<String?>
Get a visitor ID: The #distinct_id value in the reported data.
getPresetProperties({String? appId}) Future<Map<String, dynamic>?>
Gets prefabricated properties for all events.
getSuperProperties({String? appId}) Future<Map<String, dynamic>?>
Gets the public event properties that have been set.
init(String appId, String serverUrl) Future<void>
Initialize the SDK. The track function is not available until this interface is invoked.
initWithConfig(TDConfig config) Future<void>
Initialize the SDK. The track function is not available until this interface is invoked.
lightInstance({String? appId}) Future<String>
Create lightweight SDK instances. Lightweight SDK instances do not support caching of local account ids, guest ids, public properties, etc.
login(String loginId, {String? appId}) Future<void>
Set the account ID. Each setting overrides the previous value. Login events will not be uploaded.
logout({String? appId}) Future<void>
Clearing the account ID will not upload user logout events.
setDistinctId(String identity, {String? appId}) → void
Set the distinct ID to replace the default UUID distinct ID.
setDynamicSuperProperties(Map<String, dynamic> f(), {String? appId}) → void
Set dynamic public properties. Each event uploaded after that will contain a public event attribute.
setSuperProperties(Map<String, dynamic> properties, {String? appId}) → void
Set the public event attribute, which will be included in every event uploaded after that. The public event properties are saved without setting them each time.
setTrackStatus(TDTrackStatus status, {String? appId}) → void
The switch reporting status is suspended and restored.
timeEvent(String eventName, {String? appId}) → void
Record the event duration, call this method to start the timing, stop the timing when the target event is uploaded, and add the attribute #duration to the event properties, in seconds.
track(String eventName, {Map<String, dynamic>? properties, DateTime? dateTime, String? timeZone, String? appId}) → void
Upload a single event, containing only preset properties and set public properties.
trackEventModel(TrackEventModel eventModel, {String? appId}) → void
Upload a special type of event.
unsetSuperProperty(String property, {String? appId}) → void
Clears a public event attribute.
userAdd(Map<String, num> properties, {String? appId}) → void
Only one attribute is set when the user attributes of a numeric type are added.
userAppend(Map<String, List> properties, {String? appId}) → void
Append a user attribute of the List type.
userDelete({String? appId}) → void
Delete the user attributes, but retain the uploaded event data. This operation is not reversible and should be performed with caution.
userSet(Map<String, dynamic> properties, {String? appId}) → void
Sets the user property, replacing the original value with the new value if the property already exists.
userSetOnce(Map<String, dynamic> properties, {String? appId}) → void
Sets a single user attribute, ignoring the new attribute value if the attribute already exists.
userUniqAppend(Map<String, List> properties, {String? appId}) → void
The element appended to the library needs to be done to remove the processing, remove the support, and then import.
userUnset(String property, {String? appId}) → void
Reset user properties.