Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
mahyarmirrashed committed Dec 7, 2024
1 parent d44344b commit 58f07f6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
let { children } = $props();
</script>

<svelte:head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SK8KKXP57Z">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-SK8KKXP57Z");
</script>
</svelte:head>

<ModeWatcher />
<ParaglideJS {i18n}>
{@render children()}
Expand Down

0 comments on commit 58f07f6

Please sign in to comment.