MatomoTracker class

Properties

contentBase String
URL for the current action.
latefinal
currentScreenId String?
6 character unique ID that identifies which actions were performed on a specific page view.
getter/setter pair
getAuthToken String?
no setter
hashCode int
The hash code for this object.
no setterinherited
initialized bool
getter/setter pair
log → Logger
final
optOut bool?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenResolution Size
The resolution of the device the visitor is using, eg 1280x1024.
latefinal
session ↔ Session
latefinal
siteId int
latefinal
url String
latefinal
userAgent String?
The user agent is used to detect the operating system and browser used.
latefinal
visitor Visitor
no setter

Methods

clear() → void
Clear the following data from the SharedPreferences:
dispatchEvents() → void
Iterate on the events in the queue and send them to Matomo.
dispose() → void
Cancel the timer which checks the queued events to send. (This will not clear the queue.)
getOptOut() bool
initialize({required int siteId, required String url, String? visitorId, String? contentBaseUrl, int dequeueInterval = 10, String? tokenAuth}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setOptOut({required bool optout}) Future<void>
setVisitorUserId(String? userId) → void
toString() String
A string representation of this object.
inherited
trackCartUpdate(List<TrackingOrderItem>? trackingOrderItems, num? subTotal, num? taxAmount, num? shippingCost, num? discountAmount, {Map<String, String>? dimensions}) → void
trackDimensions(Map<String, String> dimensions) → void
trackEvent({required String eventCategory, required String action, String? eventName, String? name, String? widgetName, int? eventValue, Map<String, String>? dimensions}) → void
trackGoal(int goalId, {double? revenue, Map<String, String>? dimensions}) → void
trackOrder(String? orderId, List<TrackingOrderItem>? trackingOrderItems, num? revenue, num? subTotal, num? taxAmount, num? shippingCost, num? discountAmount, {Map<String, String>? dimensions}) → void
trackScreen(BuildContext context, {required String eventName, String? currentScreenId, String? path, Map<String, String>? dimensions}) → void
This will register an event with trackScreenWithName by using the context.widget.toStringShort() value.
trackScreenWithName({required String widgetName, required String eventName, String? currentScreenId, String? path, Map<String, String>? dimensions}) → void
Register an event with eventName as the event's name and widgetName as the event's action.
trackSearch({required String searchKeyword, String? searchCategory, int? searchCount, Map<String, String>? dimensions}) → void

Operators

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

Static Properties

instance MatomoTracker
final

Constants

kFirstVisit → const String
kOptOut → const String
kVisitCount → const String
kVisitorId → const String