Skip to content

Commit

Permalink
feat(analytics): add google analytics 4 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
poxrud committed Sep 4, 2023
1 parent 525fdf3 commit 41a11e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
9 changes: 9 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5N07TJ1XTF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'G-5N07TJ1XTF');
</script>
21 changes: 0 additions & 21 deletions _includes/footer.html

This file was deleted.

6 changes: 2 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<link rel="stylesheet" href={{"/assets/css/main.css" | relative_url }}>
{% include icons-svgs.html %}
{% include analytics.html}
</head>

<body class="p-4 lg:mx-auto flex flex-col min-h-screen max-w-5xl">
Expand All @@ -47,10 +48,7 @@ <h1 class="hero__headline text-[min(10vw,60px)] leading-none text-cool-orange">W

{{ content }}

<footer class="mt-auto py-6 border-t border-zinc-100 text-center mt-8">
{% comment}
{% include footer.html %}
{% endcomment %}
<footer class="py-6 border-t border-zinc-100 text-center mt-8">
<p class="text-gray-500">©2023 Phil Oxrud. All rights reserved.</p>
</footer>
</body>
Expand Down

0 comments on commit 41a11e7

Please sign in to comment.