Skip to content

Commit

Permalink
Add Google Analytics tracking code
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelink committed Jan 19, 2024
1 parent 3d7b004 commit 4995eaf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
const theme = localStorage.getItem('theme-preference') || 'auto';
document.firstElementChild?.setAttribute('data-theme', theme);
</script>

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

gtag('config', 'G-DJGSVHN3CW');
</script>

%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down

0 comments on commit 4995eaf

Please sign in to comment.