• 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]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Ingo Steinke (openmindculture)

    (@openmindculture)

    As this is still unanswered and unfixed 3 months later, I consider recommending my customers to switch to Matomo.

    Plugin Author Passionate Brains

    (@passionatebrains)

    Dear Ingo,

    Sorry for the delay in reply.

    The JavaScript error you’re encountered does not appear to be part of any JavaScript added through the plugin itself. It may originate from another plugin or custom script on the site. To resolve this, please review any additional plugins or scripts that might be introducing or modifying JavaScript in your environment, as they could be causing conflicts. Checking through these might help identify the root source of this error.

    Hope you will soon retry our plugin in the future.

    Best regards,
    Passionate Brains

    Thread Starter Ingo Steinke (openmindculture)

    (@openmindculture)

    Thanks!
    I just checked again and can’t reproduce the error anymore either. It seems that the plugins had been updated after my last comment, so this has probably been fixed, regardless which Google-related plugin wrote that.

    Thread Starter Ingo Steinke (openmindculture)

    (@openmindculture)

    The error happens again (erratically). Solution: switch to Matomo, increase privacy, don’t waste any more time with Google Analytics.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.