Uncaught TypeError: window[o] is not a function
-
Dear all, WooCommerce Google Analytics integrations throws a JavaScript error in the client browser (Chrome). There is no minification plugin active. This is the error message:
main.js?ver=50c6d17d67ef40d67991:1 Uncaught TypeError: window[o] is not a function
at main.js?ver=50c6d17d67ef40d67991:1:4265
at main.js?ver=50c6d17d67ef40d67991:1:4461
at Array.forEach ()
at main.js?ver=50c6d17d67ef40d67991:1:4408
at HTMLDocument.C (main.js?ver=50c6d17d67ef40d67991:1:6932)This is the problematic code:
const t = function({events: t, tracker_function_name: o}) {
return function(n) {
const c = e[n];
if (“function” != typeof c)
throw new Error(Event ${n} is not supported.
);
return function(e) {
const r = c(e);
t.includes(n) && r && window[o](“event”, n, r)
}
}
}(window.ga4w.settings);How to fix this error without patching the plugin’s JavaScript code?
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.