MatomoTracker class
Constructors
-
MatomoTracker()
-
This is only used for testing purpose, because testing singleton is hard.
Methods
-
clear()
→ void
-
Clear the following data from the local storage:
-
dispatchEvents()
→ FutureOr<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.)
-
getUserAgent({DeviceInfoPlugin? deviceInfoPlugin})
→ Future<String?>
-
-
initialize({required int siteId, required String url, String? visitorId, String? contentBaseUrl, int dequeueInterval = 10, String? tokenAuth, LocalStorage? localStorage, PackageInfo? packageInfo, PlatformInfo? platformInfo, bool cookieless = false, Level verbosityLevel = Level.off, })
→ Future<void>
-
Initialize the tracker.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pause()
→ void
-
-
resume()
→ void
-
-
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, 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
-
-
trackOutlink(String? link, {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
-