Skip to content

Commit 90131f1

Browse files
committed
Add google tag
1 parent febdbe7 commit 90131f1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/layouts/Layout.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,20 @@ const socialImageURL = new URL(
117117
gtag('js', new Date());
118118
gtag('config', 'G-V66JPM85FQ');
119119
</script>
120+
121+
<!-- Google Tag Manager -->
122+
<script is:inline>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
123+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
124+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
125+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
126+
})(window,document,'script','dataLayer','GTM-WFZGV9BT');</script>
127+
<!-- End Google Tag Manager -->
120128
</head>
121129
<body>
130+
<!-- Google Tag Manager (noscript) -->
131+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFZGV9BT"
132+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
133+
<!-- End Google Tag Manager (noscript) -->
122134
<slot />
123135
</body>
124136
</html>

0 commit comments

Comments
 (0)