SnowplowTracker class Getting started
Instance of an initialized Snowplow tracker identified by a namespace.
Constructors
- SnowplowTracker({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 intrackerConfig.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
andScreenView
events from a navigator when the currently active ModalRoute of the navigator changes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
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