STRAnalytics class

Entry point for the Storyly Analytics module.

Provides a simple API for tracking product-related analytics events (e.g. product detail page views, add-to-cart, wishlist additions, purchases) independently from the Storyly placement widgets.

Usage:

  1. Call initialize once with a valid STRAnalyticsConfig before tracking.
  2. Call track (or trackProduct) to record product events.

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 Methods

initialize(STRAnalyticsConfig config) → Future<void>
Initializes the Storyly Analytics module with the provided configuration.
track(STRAnalyticProductEvent event, List<STRAnalyticProduct> products, {String? orderId}) → Future<void>
Tracks a product analytics event involving one or more products.
trackProduct(STRAnalyticProductEvent event, STRAnalyticProduct product, {String? orderId}) → Future<void>
Tracks a product analytics event involving a single product.