文档
Protocol Verified

分析设置

GA4, Clarity, 和 AdSense 配置。

PRID: 1202
VERIFIED
1 min read

分析与遥测设置指南

此脚手架预集成了 Google Analytics 4 (GA4)、Microsoft Clarity 和 Google AdSense。

1. 快速设置 (简单方式)

打开 site.config.ts 并使用您的生产 ID 更新 analytics 对象:

typescript
export const siteConfig = { // ... analytics: { googleAnalyticsId: "G-XXXXXXXXXX", microsoftClarityId: "XXXXXXXXXX", googleAdsenseId: "ca-pub-XXXXXXXXXXXXXXXX", }, // ... }

...

Authority Distribution

Share this technical artifact