Skip to content

Commit 5d15c73

Browse files
committed
add Google Analytics 4 scripts in the <head> of index.html
1 parent b95b4a0 commit 5d15c73

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

themes/book/layouts/partials/docs/html-head.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,12 @@
8080
// })
8181
})
8282
</script>
83+
<!-- Global site tag (gtag.js) - Google Analytics -->
84+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-40FBSF4MFT"></script>
85+
<script>
86+
window.dataLayer = window.dataLayer || [];
87+
function gtag(){dataLayer.push(arguments);}
88+
gtag('js', new Date());
89+
gtag('config', 'G-40FBSF4MFT');
90+
</script>
8391
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>

0 commit comments

Comments
 (0)