AnalyticsHelper class

Helper for logging usage of core features and exceptions Logging:

  • Errors and Problems (sentry)
  • App start
  • Product scan
  • Product page open
  • Knowledge panel open
  • personalized ranking (without sharing the preferences)
  • search
  • external links

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

isEnabled → bool
Returns true if analytics reporting is enabled.
no setter
latestSearch ↔ String
getter/setter pair

Static Methods

initMatomo(bool screenshotMode, {DispatchSettings dispatchSettings = const DispatchSettings.persistent()}) → Future<void>
Undispatched actions survive a restart for a day, and no longer: the default PersistenceFilter of DispatchSettings.persistent drops anything older than 23h59m59s when the queue is loaded.
initSentry({required dynamic appRunner()?}) → Future<void>
linkPreferences(UserPreferences userPreferences) → Future<void>
sendException(dynamic throwable, {dynamic stackTrace}) → void
trackAppOpen(UserPreferences userPreferences, {Duration? backgroundedFor}) → void
trackCustomEvent(String msg, String category, {int? eventValue, String? barcode, String? action, ProductType? productType}) → void
trackEvent(AnalyticsEvent msg, {int? eventValue, String? barcode, String? action}) → void
trackProductEdit(AnalyticsEditEvents editEventName, Product product, [bool saved = false]) → void
trackProductEvent(AnalyticsEvent msg, {required Product product, int? eventValue}) → void
trackRobotoffExtraction(AnalyticsRobotoffEvents event, Nutrient nutrient, Product product) → void
trackSearch({required String search, String? searchCategory, int? searchCount}) → void
trackTaglineNewsEvent(AnalyticsEvent msg, String newsId) → void