dify/web/app/components/base/analytics-consent
2026-08-18 12:34:34 +00:00
..
__tests__ fix(web): gate system features requests by connection (#40939) 2026-08-18 12:34:34 +00:00
cloud-analytics-runtime.tsx refactor: centralize deployment edition in system features (#39454) 2026-07-24 07:15:02 +00:00
cloud-analytics.tsx fix(web): gate system features requests by connection (#40939) 2026-08-18 12:34:34 +00:00
consent-store.ts feat: gate cloud analytics behind cookie consent (#39408) 2026-07-23 02:40:54 +00:00
cookieyes-consent-bridge.tsx feat: gate cloud analytics behind cookie consent (#39408) 2026-07-23 02:40:54 +00:00
README.md docs(web): consolidate maintainer guidance (#40758) 2026-08-14 03:40:05 +00:00
request-boundary.ts refactor: centralize deployment edition in system features (#39454) 2026-07-24 07:15:02 +00:00

Analytics Consent

This module owns CookieYes consent state and the Dify Cloud analytics boundary.

  • request-boundary.ts decides whether a request is eligible for Cloud analytics before client code mounts.
  • cookieyes-consent-bridge.tsx is the only CookieYes-to-application state adapter.
  • consent-store.ts owns the client consent snapshot; analytics consumers must gate SDK activation or event emission on that snapshot.
  • cloud-analytics.tsx gates analytics scripts and runtime mounting by deployment, environment, host, and route.
  • cloud-analytics-runtime.tsx mounts the consent bridge and client analytics consumers.

Amplitude, Google Analytics, attribution, and other consumers must depend on this boundary instead of reading CookieYes state directly.