Skip to content

Commit 6ea3a5c

Browse files
Merge pull request #3 from OpenSecFlow/PanMarkCake-patch-2
Integrate Google Analytics tracking script
2 parents e7ffa80 + aa29eb0 commit 6ea3a5c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/layouts/MainLayout.astro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ const {
8181
authorUrl={authorUrl}
8282
themeColor={themeColor}
8383
/>
84+
<!-- Google tag (gtag.js) -->
85+
<script is:inline async src="https://www.googletagmanager.com/gtag/js?id=G-883J22R85Z"></script>
86+
<script is:inline>
87+
window.dataLayer = window.dataLayer || [];
88+
function gtag(){dataLayer.push(arguments);}
89+
gtag('js', new Date());
90+
gtag('config', 'G-883J22R85Z');
91+
</script>
8492
</head>
8593
<body class="min-h-screen bg-white">
8694
<Navigation />

0 commit comments

Comments
 (0)