From 25d616e765a2617b8c284f06f9682cd9bce01d7a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 19 Jun 2022 12:19:01 +0100 Subject: Update to GA4 --- gentoobrowse/js/googletracking.js | 17 +++++++---------- gentoobrowse/xslt/base.xslt | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gentoobrowse/js/googletracking.js b/gentoobrowse/js/googletracking.js index 62c38cd..27e4f92 100644 --- a/gentoobrowse/js/googletracking.js +++ b/gentoobrowse/js/googletracking.js @@ -1,10 +1,7 @@ -var _gaq = _gaq || []; -_gaq.push(['_setAccount', 'UA-19177673-1']); -_gaq.push(['_trackPageview']); - -(function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); -})(); - +window.dataLayer = window.dataLayer || []; +function gtag() +{ + dataLayer.push(arguments); +} +gtag('js', new Date()); +gtag('config', 'G-0JDJB4S82Q'); diff --git a/gentoobrowse/xslt/base.xslt b/gentoobrowse/xslt/base.xslt index 4df49f6..73e906f 100644 --- a/gentoobrowse/xslt/base.xslt +++ b/gentoobrowse/xslt/base.xslt @@ -170,6 +170,7 @@ +