From af63b9bf50641d93f9f42114a1a4f0f8ad7c77d8 Mon Sep 17 00:00:00 2001 From: Jon McClure Date: Tue, 30 May 2023 13:42:19 +0100 Subject: [PATCH] change func signature for ga4 --- src/components/Analytics/providers/ga.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Analytics/providers/ga.ts b/src/components/Analytics/providers/ga.ts index cdfbd24f..5a01e1f7 100644 --- a/src/components/Analytics/providers/ga.ts +++ b/src/components/Analytics/providers/ga.ts @@ -21,8 +21,8 @@ export default () => { if (!window.gtag) { attachScript(); /** @type {Gtag.Gtag} */ - window.gtag = (...args) => { - window.dataLayer.push(...args); + window.gtag = function() { + window.dataLayer.push(arguments); }; window.gtag('js', new Date()); // config event registers a pageview by default