feat(ssr): add Google Analytics tracking to index.html

- Integrated Google Tag Manager for enhanced tracking and analytics capabilities.
- Added asynchronous loading of gtag.js and configuration for tracking ID G-DZMBZBW3EC.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-07-04 15:49:10 +08:00
parent 8478bfed1e
commit d8e57f3a10
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 10 additions and 0 deletions

View File

@ -19,7 +19,17 @@
<meta name="apple-itunes-app" content="app-id=6739802604" />
<link rel="manifest" href="/manifest.json" />
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DZMBZBW3EC"></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag("js", new Date())
gtag("config", "G-DZMBZBW3EC")
</script>
<script>
function setTheme() {
let e = "follow:color-mode",