feat(analytics): 添加不蒜子统计数据格式化功能

- 更新不蒜子统计元素 ID 配置
- 实现自动格式化脚本,支持 K/W/M 单位转换
- 添加对 Google 和腾讯分析配置的动态引用
- 替换博客链接为 Twitter 链接并更新图标
- 优化统计数据显示逻辑,处理禁用状态与数字格式化
This commit is contained in:
hehh
2025-11-26 00:16:40 +08:00
parent f9a1587587
commit 01e55e6d82
3 changed files with 84 additions and 8 deletions

View File

@@ -392,7 +392,7 @@
<!-- 可选:继续调用 config -->
<script type="text/javascript">
try {
gtag('config', 'G-DYWDEVKDP0');
gtag('config', SiteConfig.analytics.google.id);
} catch (e) {
console.error("Google Analytics config 失败", e);
}
@@ -411,7 +411,7 @@
};
s.LA ? s.LA.ids && o() : (s.LA = p, s.LA.ids = [], o()), r.parentNode.insertBefore(n, r)
}()
}({id: "3OBGjwDdEIRS7XZ1", ck: "3OBGjwDdEIRS7XZ1"});
}({id: SiteConfig.analytics.tencent.id, ck: SiteConfig.analytics.tencent.ck});
</script>
</body>
</html>