analytics advanced
Everything else the package exports, for when you go beyond its components and hooks, such as your own queries or cache updates. Most projects never need these.
Other functions and constants7
createAnalyticsBus | A pub/sub bus with no vendor knowledge at all. @evolve-storefront/analytics/bus |
createConsentGatedBus | A bus that retains nothing once the shopper has refused: replayLimit is zero, so a later yes cannot drain events collected under the no into a vendor.@evolve-storefront/analytics/consent-gated |
listenWhenGranted | Subscribe the listeners only while analytics consent is granted. @evolve-storefront/analytics/consent-gated |
createListener | Turn a handler record into a listener. @evolve-storefront/analytics/listener |
createPiwikListener | Pushes Piwik PRO ecommerce commands onto window._paq, in its current API (ecommerceAddToCart, ecommerceOrder, …) rather than the deprecated addEcommerceItem family.@evolve-storefront/analytics/listeners/piwik |
createGtmListener | Pushes GA4 ecommerce events onto window.dataLayer.@evolve-storefront/analytics/listeners/gtm |
createAlgoliaListener | Sends Algolia insights events, attributed to the search that produced them. @evolve-storefront/analytics/listeners/algolia |
Types14
AnalyticsBus | @evolve-storefront/analytics/types |
AnalyticsCart | @evolve-storefront/analytics/types |
AnalyticsCartLine | @evolve-storefront/analytics/types |
AnalyticsEvent | The discriminated union, derived. @evolve-storefront/analytics/types |
AnalyticsEventName | @evolve-storefront/analytics/types |
AnalyticsEvents | Every event the storefront can report, and its payload. @evolve-storefront/analytics/types |
AnalyticsListener | @evolve-storefront/analytics/types |
AnalyticsListItem | A product and where it sat in the list it was seen or clicked in. @evolve-storefront/analytics/types |
AnalyticsOrder | @evolve-storefront/analytics/types |
AnalyticsProduct | A product, as a vendor wants one. @evolve-storefront/analytics/types |
CheckoutRoute | How the shopper set out for the checkout: the cart's checkout button, or a wallet that skips it. @evolve-storefront/analytics/types |
Emit | @evolve-storefront/analytics/types |
Handlers | One optional handler per event, typed against its own payload. @evolve-storefront/analytics/listener |
InsightsClient | The search-insights client, structurally.@evolve-storefront/analytics/listeners/algolia |
Not listed: 8 props and options types. They appear as the tables on the pages of what they type.

