Add Google Analytics (G-XMJWQZ8FWP) to site <head>

Inserted gtag.js script and config block in _layouts/default.html
after the meta description tag — applies to every page on the site.
This commit is contained in:
Your Name
2026-08-01 05:50:42 -04:00
parent 82f361462d
commit c16442d4dd
+11 -1
View File
@@ -5,7 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }} - {{ site.subtitle }}{% endif %}</title>
<meta name="description" content="{{ page.description | default: site.description }}">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XMJWQZ8FWP"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XMJWQZ8FWP');
</script>
<!-- Tailwind CSS via CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<script>