From 4662a2d5601bd7970faa955a17694400a4b526b5 Mon Sep 17 00:00:00 2001 From: Glenn 'devalias' Grant Date: Thu, 20 Jun 2024 11:31:44 +1000 Subject: [PATCH] update legacy UA analytics to GA4 --- _config.yml | 2 +- _includes/head/head.html | 2 ++ _includes/scripts/analytics.html | 17 ++++++++--------- _layouts/default.html | 1 - 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/_config.yml b/_config.yml index d6735f4dc..439ed11af 100644 --- a/_config.yml +++ b/_config.yml @@ -53,7 +53,7 @@ repository: 0xdevalias/devalias.net # alexa: 1234 # yandex: 1234 -google_analytics: UA-27970144-1 +google_analytics: G-3FW5B1CS26 disqus_shortname: devalias # Front Matter defaults (http://jekyllrb.com/docs/configuration/#front-matter-defaults) diff --git a/_includes/head/head.html b/_includes/head/head.html index ad73bdfe9..fb187c23a 100755 --- a/_includes/head/head.html +++ b/_includes/head/head.html @@ -19,6 +19,8 @@ + {% include scripts/analytics.html %} + {% include head/styles.html %} {% include head/fontawesome.html %} diff --git a/_includes/scripts/analytics.html b/_includes/scripts/analytics.html index d1c5d3cf3..6acefb363 100755 --- a/_includes/scripts/analytics.html +++ b/_includes/scripts/analytics.html @@ -1,10 +1,9 @@ - - + \ No newline at end of file + gtag('config', '{{ site.google_analytics }}'); + diff --git a/_layouts/default.html b/_layouts/default.html index ed248c75f..2fa35b623 100755 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -38,7 +38,6 @@ - {% include scripts/analytics.html %} {% unless site.webmentions.disabled %} {% include scripts/webmention.html %} {% endunless %}