Skip to content

Commit 1534f22

Browse files
committed
Add Google Analytics and Microsoft Clarity tracking scripts
1 parent fa485b7 commit 1534f22

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/layouts/Layout.astro

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ const {
5454
<!-- Theme Color -->
5555
<meta name="theme-color" content="#1C64F2" />
5656

57+
<!-- Google tag (gtag.js) -->
58+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-X1KR8PJS23"></script>
59+
<script is:inline>
60+
window.dataLayer = window.dataLayer || [];
61+
function gtag(){dataLayer.push(arguments);}
62+
gtag('js', new Date());
63+
64+
gtag('config', 'G-X1KR8PJS23');
65+
</script>
66+
67+
<!-- Microsoft Clarity -->
68+
<script type="text/javascript" is:inline>
69+
(function(c,l,a,r,i,t,y){
70+
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
71+
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
72+
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
73+
})(window, document, "clarity", "script", "szxmnn2kmf");
74+
</script>
75+
5776
<!-- Fonts -->
5877
<link rel="preconnect" href="https://fonts.googleapis.com">
5978
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

0 commit comments

Comments
 (0)