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).
Pinned to revision 0d6b966d3aa9, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/sfnext-analytics-consent/SKILL.md
- skills/sfnext-analytics-consent/evals/trigger-evals.json
- skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md
Every link opens the file at its source, pinned to the revision this page describes.