Skip to content

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
createAnalyticsBusA pub/sub bus with no vendor knowledge at all.
@evolve-storefront/analytics/bus
createConsentGatedBusA 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
listenWhenGrantedSubscribe the listeners only while analytics consent is granted.
@evolve-storefront/analytics/consent-gated
createListenerTurn a handler record into a listener.
@evolve-storefront/analytics/listener
createPiwikListenerPushes Piwik PRO ecommerce commands onto window._paq, in its current API (ecommerceAddToCart, ecommerceOrder, …) rather than the deprecated addEcommerceItem family.
@evolve-storefront/analytics/listeners/piwik
createGtmListenerPushes GA4 ecommerce events onto window.dataLayer.
@evolve-storefront/analytics/listeners/gtm
createAlgoliaListenerSends 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
AnalyticsEventThe discriminated union, derived.
@evolve-storefront/analytics/types
AnalyticsEventName
@evolve-storefront/analytics/types
AnalyticsEventsEvery event the storefront can report, and its payload.
@evolve-storefront/analytics/types
AnalyticsListener
@evolve-storefront/analytics/types
AnalyticsListItemA product and where it sat in the list it was seen or clicked in.
@evolve-storefront/analytics/types
AnalyticsOrder
@evolve-storefront/analytics/types
AnalyticsProductA product, as a vendor wants one.
@evolve-storefront/analytics/types
CheckoutRouteHow 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
HandlersOne optional handler per event, typed against its own payload.
@evolve-storefront/analytics/listener
InsightsClientThe 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.