Skip to content

Commit 2048d6e

Browse files
committed
2024.10.30: Re-enable google analytics.
1 parent e1c8d10 commit 2048d6e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/layouts/Layout.astro

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ const structuredData = {
5757
class={`${scrollSmooth && "scroll-smooth"}`}
5858
>
5959
<head>
60+
<!-- Google tag (gtag.js) -->
61+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-V66JPM85FQ"></script>
62+
<script>
63+
window.dataLayer = window.dataLayer || [];
64+
function gtag(){dataLayer.push(arguments);}
65+
gtag('js', new Date());
66+
67+
gtag('config', 'G-V66JPM85FQ');
68+
</script>
69+
6070
<meta charset="UTF-8" />
6171
<meta name="viewport" content="width=device-width" />
6272
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
@@ -136,15 +146,6 @@ const structuredData = {
136146

137147
<script is:inline src="/toggle-theme.js" async></script>
138148
</head>
139-
<!-- Google tag (gtag.js) -->
140-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-V66JPM85FQ"></script>
141-
<script>
142-
window.dataLayer = window.dataLayer || [];
143-
function gtag(){dataLayer.push(arguments);}
144-
gtag('js', new Date());
145-
146-
gtag('config', 'G-V66JPM85FQ');
147-
</script>
148149
<body>
149150
<slot />
150151
</body>

0 commit comments

Comments
 (0)