dify/web/app/components/base/analytics-consent/cloud-analytics-runtime.tsx
Coding On Star 8d293023cc
feat: gate cloud analytics behind cookie consent (#39408)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
2026-07-23 02:40:54 +00:00

18 lines
462 B
TypeScript

'use client'
import AmplitudeProvider from '@/app/components/base/amplitude'
import { usePathname } from '@/next/navigation'
import { CookieYesConsentBridge } from './cookieyes-consent-bridge'
import { isCloudAnalyticsPath } from './request-boundary'
export function CloudAnalyticsRuntime() {
const pathname = usePathname()
return (
<>
<CookieYesConsentBridge />
<AmplitudeProvider active={isCloudAnalyticsPath(pathname)} />
</>
)
}