feat(analytics): 增强 Google Analytics 隐私合规与追踪功能

- 修复 allow_google_signals 配置为 false,禁用跨设备追踪
- 升级 Cookie 同意组件,支持三级偏好控制(必要/分析/营销)
- 新增滚动深度追踪组件,追踪 25%/50%/75%/100% 里程碑
- 更新隐私政策,新增 Cookie 和网站分析工具章节
- 新增细化同意管理函数,支持 PIPL 合规
This commit was merged in pull request #10.
This commit is contained in:
张翔
2026-04-22 22:09:38 +08:00
parent 96dddeb20b
commit 95f246fa36
6 changed files with 387 additions and 54 deletions
+2
View File
@@ -8,6 +8,7 @@ import { GoogleAnalytics } from "@/components/analytics/GoogleAnalytics";
import { CookieConsent } from "@/components/analytics/CookieConsent";
import { PerformanceTracker } from "@/components/analytics/PerformanceTracker";
import { OutboundLinkTracker } from "@/components/analytics/OutboundLinkTracker";
import { ScrollDepthTracker } from "@/components/analytics/ScrollDepthTracker";
import { OrganizationSchema, WebsiteSchema } from "@/components/seo/structured-data";
import { MobileTabBar } from "@/components/layout/mobile-tab-bar";
import { ErrorBoundary } from "@/components/ui/error-boundary";
@@ -141,6 +142,7 @@ export default function RootLayout({
<GoogleAnalytics />
<PerformanceTracker />
<OutboundLinkTracker />
<ScrollDepthTracker />
<ThemeProvider>
<ErrorBoundary>
{children}