Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
betich committed Oct 20, 2024
1 parent d5276e7 commit 79f6b64
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/templates/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,20 @@ const {
</main>

{!hideFooter && <Footer />}

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

gtag('config', 'G-D28VR1K58G');
</script>
</body>
</html>

0 comments on commit 79f6b64

Please sign in to comment.