feat(analytics): 添加多种网站统计脚本支持

- 集成 51.la 统计 SDK
- 添加百度站点统计代码
- 配置 Google Analytics 异步加载
- 增强统计脚本错误捕获与日志记录
- 确保统计代码在页面中的兼容性与安全性
This commit is contained in:
hehh
2025-11-25 15:07:03 +08:00
parent 3a28598260
commit edd878351c
2 changed files with 48 additions and 0 deletions

View File

@@ -371,6 +371,10 @@
}
</script>
<script>
!function(p){"use strict";!function(t){var s=window,e=document,i=p,c="".concat("https:"===e.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=e.createElement("script"),r=e.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=c,n.id="LA_COLLECT",i.d=n;var o=function(){s.LA.ids.push(i)};s.LA?s.LA.ids&&o():(s.LA=p,s.LA.ids=[],o()),r.parentNode.insertBefore(n,r)}()}({id:"3OBGjwDdEIRS7XZ1",ck:"3OBGjwDdEIRS7XZ1"});
</script>
<!--<script src="./js/StarrySky.js"></script>-->
<!--<script src="./js/stars.js"></script>-->