feat: add Microsoft Clarity analytics provider
Add Microsoft Clarity as a fourth analytics provider option alongside Umami, Google Analytics, and Custom. Clarity provides free heatmaps, session recordings, and user analytics. - admin.types.ts: Add 'clarity' to AnalyticsProvider union type - api/admin/site/route.ts: Add 'clarity' to validation - admin/page.tsx: Add Clarity option to dropdown + Project ID input UI - layout.tsx: Inject Clarity tracking script with project ID
This commit is contained in:
@@ -75,7 +75,7 @@ export interface AdminConfig {
|
||||
OIDCMinTrustLevel?: number; // 最低信任等级(仅LinuxDo网站有效,为0时不判断)
|
||||
// 流量统计配置
|
||||
AnalyticsEnabled?: boolean; // 是否启用流量统计
|
||||
AnalyticsProvider?: 'umami' | 'google' | 'custom'; // 统计服务提供商
|
||||
AnalyticsProvider?: 'umami' | 'google' | 'clarity' | 'custom'; // 统计服务提供商
|
||||
AnalyticsScriptUrl?: string; // 脚本URL(Umami: umami.js地址; GA: gtag URL; 自定义: 脚本src)
|
||||
AnalyticsWebsiteId?: string; // 网站ID(Umami: website_id; GA: Measurement ID如G-XXXX; 自定义: 留空)
|
||||
AnalyticsCustomScript?: string; // 自定义统计代码(仅custom模式使用,完整的HTML脚本内容)
|
||||
|
||||
Reference in New Issue
Block a user