Tracker class

Tracker The tracker class. This class is used for tracking events, and delegates them to other classes responsible for sending, storage, etc.

Annotations

Constructors

Tracker({Subject? subject, required Emitter emitter, required String namespace, required String appId, bool base64 = false, DevicePlatforms devicePlatform = DevicePlatforms.mobile, LogLevel logLevel = LogLevel.off, bool mobileContext = false, bool geoContext = false, bool screenViewEvents = false, bool applicationContext = false, bool sessionContext = false, int sessionCheckInterval = 15, int foregroundTimeout = 600, int backgroundTimeout = 300, bool lifecycleEvents = false, bool screenContext = false, bool exceptionEvents = false, bool installTracking = false, GDPRContext? gdprContext})
Create a Tracker with default settings
const

Properties

appId String
appId The tracker's app ID.
final
applicationContext bool
applicationContext Whether application context is enabled.
final
backgroundTimeout int
backgroundTimeout Length of timeout in the foreground in seconds.
final
base64 bool
base64 Whether events are Base64 encoded.
final
devicePlatform DevicePlatforms
devicePlatform The DevicePlatforms enum indicating the current platform.
final
emitter Emitter
emitter The emitter used by the tracker.
final
exceptionEvents bool
screenContext Whether exception events are tracked. On iOS, setting true enables exception tracking. On Android, setting true enables crash tracking.
final
foregroundTimeout int
foregroundTimeout Length of timeout in the foreground in seconds.
final
gdprContext GDPRContext?
gdprContext GDPR basis for processing and the details of a related document.
final
geoContext bool
geoContext Whether to enable the geolocation context.
final
hashCode int
The hash code for this object.
no setteroverride
installTracking bool
installTracking Whether to autotrack application installs.
final
lifecycleEvents bool
lifecycleEvents Whether foreground and background events are enabled.
final
logLevel LogLevel
logLevel The LogLevel enum indication the current logging level.
final
mobileContext bool
mobileContext Whether mobile context is enabled. The mobile context contains information like OS version, device model, carrier and more.
final
namespace String
namespace The tracker's namespace.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenContext bool
screenContext Whether screen contexts are enabled.
final
screenViewEvents bool
screenViewEvents Whether to auto-track screen views.
final
sessionCheckInterval int
sessionCheckInterval Length of time in seconds that session checks for timeout.
final
sessionContext bool
sessionContext Whether session context is enabled.
final
subject Subject?
subject
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
toMap Converts the tracker object to JSON.
toString() String
A string representation of this object.
inherited

Operators

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