SnowplowTracker class Getting started

Instance of an initialized Snowplow tracker identified by a namespace.

Constructors

SnowplowTracker.new({required Configuration configuration})
const

Properties

configuration Configuration
Tracker configuration.
final
hashCode int
The hash code for this object.
no setterinherited
namespace String
Namespace that identifies the tracker.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId Future<String?>
Returns the identifier (string UUIDv4) for the session.
no setter
sessionIndex Future<int?>
Returns the index (number) of the current session for this user.
no setter
sessionUserId Future<String?>
Returns the identifier (string UUIDv4) for the user of the session.
no setter
tracksPageViews bool
Returns true if current platform is Web and PageViewEvent tracking is enabled in trackerConfig.webActivityTracking configuration.
no setter

Methods

endMediaTracking(String id) Future<void>
Ends media tracking with the given id.
getObserver({ScreenNameExtractor nameExtractor = defaultNameExtractor}) SnowplowObserver
Returns a SnowplowObserver for automatically tracking PageViewEvent and ScreenView events from a navigator when the currently active ModalRoute of the navigator changes.
getWebViewIntegration({bool ignoreTrackerNamespace = true}) WebViewIntegration
Returns a WebViewIntegration instance that can be used to track events from a WebView. The WebViewIntegration instance will ignore the tracker namespace by default, meaning that it will track events for any tracker that sends them to the WebView. If you want to track events only for this tracker, set ignoreTrackerNamespace to false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerWebViewJavaScriptChannel({required dynamic webViewController, bool ignoreTrackerNamespace = true}) → void
Registers a JavaScript channel for the WebView to receive messages from the WebView.
setUserId(String? userId) Future<void>
Sets the business user ID to the string.
startMediaTracking(MediaTrackingConfiguration configuration) Future<MediaTracking>
Starts media tracking with the given configuration. Note: to track media events on Web, you will need to install the media JS plugin by configuration TrackerConfiguration.jsMediaPluginURL.
toString() String
A string representation of this object.
inherited
track(Event event, {List<SelfDescribing>? contexts}) Future<void>
Tracks the given event with optional context entities.

Operators

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