Skip to content

Commit 3f2a4d9

Browse files
committed
feat: Add google analytics NOTE: We need to add complaints to the users so they know they are been somehow tracked? UE and its things
1 parent f3ecc80 commit 3f2a4d9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/components/Layout.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ import Header from "./react/Header";
2222
class={"max-w-screen overflow-x-hidden" +
2323
(Astro.props.class ? " " + Astro.props.class : "")}
2424
>
25+
<!-- Google tag (gtag.js) -->
26+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8WZ5H8DJ8W"></script>
27+
<script>
28+
window.dataLayer = window.dataLayer || [];
29+
function gtag(){dataLayer.push(arguments);}
30+
gtag('js', new Date());
31+
32+
gtag('config', 'G-8WZ5H8DJ8W');
33+
</script>
2534
<LiquidEther
2635
style={{
2736
position: "fixed",

0 commit comments

Comments
 (0)