fix: add umami & ga4 placeholder in index.html of default theme#4928
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds placeholder comment markers for umami and Google Analytics within the HTML document head. These markers serve as anchor points for dynamic script injection based on environment variable configuration, addressing the issue where analytics scripts were not being loaded in the new UI. ChangesAnalytics Integration Setup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📝 变更描述 / Description
main.go中通过替换<!--umami-->和<!--Google Analytics-->为脚本代码来注入相关的分析脚本,但新版界面(default)的index.html中没有这两个 placeholder,因此脚本不会注入。此 PR 添加了这两个 placeholder,确保新版界面在配置 umami, GA4 的情况下能够正常注入相关脚本,closes #4927
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
修复后已实际运行测试 GA4 工作正常

Summary by CodeRabbit