Skip to content

Commit febdbe7

Browse files
committed
Add google tag
1 parent 4b7042d commit febdbe7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/layouts/Layout.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ const socialImageURL = new URL(
108108
<ViewTransitions />
109109

110110
<script is:inline src="/toggle-theme.js"></script>
111+
112+
<!-- Google tag (gtag.js) -->
113+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-V66JPM85FQ"></script>
114+
<script is:inline>
115+
window.dataLayer = window.dataLayer || [];
116+
function gtag(){dataLayer.push(arguments);}
117+
gtag('js', new Date());
118+
gtag('config', 'G-V66JPM85FQ');
119+
</script>
111120
</head>
112121
<body>
113122
<slot />

0 commit comments

Comments
 (0)