web-nuxt supports optional global analytics providers from zship.app.json.
Supported providers
- Google Analytics 4 via
analytics.googleAnalytics.measurementId - Plausible via
analytics.plausible.domain - Microsoft Clarity via
analytics.clarity.projectId
Consent flow
Analytics scripts are no longer injected unconditionally. The app waits for a consent decision before loading those providers.
- Consent is persisted with a cookie plus local storage
- A shared
useAnalytics()wrapper exposestrack()and page-view tracking - You can extend the same layer later for region-aware consent or first-party proxying
Next improvement path
If you need stricter compliance, add a dedicated consent center or route analytics through first-party endpoints before turning on provider IDs in production.