feat(analytics): implement runtime configuration and analytics tracking for GA4 and Baidu

This commit is contained in:
HouYunFei
2026-07-17 11:24:22 +08:00
parent a2586ffe34
commit ca6efdf0c3
15 changed files with 216 additions and 25 deletions
+5
View File
@@ -6,4 +6,9 @@ declare const __APP_RELEASES__: import("@/lib/release").ReleaseInfo[];
interface ImportMetaEnv {
// 逗号分隔的本地开发插件 URL,每次启动重新拉取(不缓存、不落库)
readonly VITE_DEV_PLUGINS?: string;
// 统计分析(可选,构建期注入):每家一个独立变量,填了谁就启用谁,可同时启用多家
// GA4 衡量 ID(G-XXXX)
readonly VITE_ANALYTICS_GA4_ID?: string;
// 百度统计站点 ID
readonly VITE_ANALYTICS_BAIDU_ID?: string;
}