Skip to content

salesforcecommercecloud/storefront-next

v1.11.0Apache-2.0

Storefront Next development skills for building React 19 storefronts on Salesforce B2C Commerce.

sfnext-analytics-consent

Storefront Next analytics: engagement adapters (Einstein, Active Data, Data 360), adding a custom adapter, tracking consent gating, PageViewTracker, useAnalytics events, and first-touch attribution (dw_attribution). Use when configuring engagement.adapters in config.server.ts, writing an adapter with hasConsent, registering it in initializeEngagementAdapters, wiring the consent banner (trackingConsent, consentCategories, dw_dnt), firing trackViewProduct/trackCartItemAdd events, debugging why no analytics events are sent, or passing campaign attribution to orders. Do not use for general config loading or env vars (use storefront-next:sfnext-configuration), CSP/script allowlisting of third-party tags (use storefront-next:sfnext-security), or SEO meta/JSON-LD (use storefront-next:sfnext-seo).

Read SKILL.md at the source

Pinned to revision 0d6b966d3aa9, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.