Skip to content

Commit c58ff3e

Browse files
committed
feat: Add Google Analytics 4 tracking (G-1NZRT4TYL6)
Integrate GA4 for docs.lumos-lang.org to track: - Page views and traffic sources - User engagement metrics - Search query performance Property: LUMOS Docs Stream ID: 13152241886 Part of issue getlumos/lumos#106
1 parent 340561f commit c58ff3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/Head.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,12 @@ const schemaOrg = {
107107

108108
{/* Schema.org JSON-LD */}
109109
<script type="application/ld+json" set:html={JSON.stringify(schemaOrg)} />
110+
111+
{/* Google Analytics 4 */}
112+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1NZRT4TYL6"></script>
113+
<script>
114+
window.dataLayer = window.dataLayer || [];
115+
function gtag(){dataLayer.push(arguments);}
116+
gtag('js', new Date());
117+
gtag('config', 'G-1NZRT4TYL6');
118+
</script>

0 commit comments

Comments
 (0)