From 74b680078a552b543f7567c7defca26f651b03ca Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 29 Oct 2024 08:19:49 -0700 Subject: [PATCH] Update ga4.js --- js/ga4.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ga4.js b/js/ga4.js index 47cfd84..51bb919 100644 --- a/js/ga4.js +++ b/js/ga4.js @@ -50,4 +50,9 @@ function addGoogleAnalyticsTags() { scriptContent.innerHTML = ` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} - gtag(' + gtag('js', new Date()); + gtag('config', '${trackingId}'); + `; + document.head.appendChild(scriptContent); + } +}