Title: Uncaught TypeError: window[o] is not a function
Last modified: July 9, 2024

---

# Uncaught TypeError: window[o] is not a function

 *  Resolved [Ingo Steinke (openmindculture)](https://wordpress.org/support/users/openmindculture/)
 * (@openmindculture)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-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:4265at main.js?ver=50c6d17d67ef40d67991:
   1:4461at Array.forEach ()at main.js?ver=50c6d17d67ef40d67991:1:4408at 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-typeerror-windowo-is-not-a-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Ingo Steinke (openmindculture)](https://wordpress.org/support/users/openmindculture/)
 * (@openmindculture)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-is-not-a-function/#post-18095661)
 * As this is still unanswered and unfixed 3 months later, I consider recommending
   my customers to switch to Matomo.
 *  Plugin Author [Passionate Brains](https://wordpress.org/support/users/passionatebrains/)
 * (@passionatebrains)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-is-not-a-function/#post-18095759)
 * 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)](https://wordpress.org/support/users/openmindculture/)
 * (@openmindculture)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-is-not-a-function/#post-18095942)
 * 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)](https://wordpress.org/support/users/openmindculture/)
 * (@openmindculture)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-is-not-a-function/#post-18100187)
 * 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)

The topic ‘Uncaught TypeError: window[o] is not a function’ is closed to new replies.

 * ![](https://ps.w.org/advance-wc-analytics/assets/icon-256x256.png?rev=3329150)
 * [AWCA - The Great Analytics Insights for Your eStore](https://wordpress.org/plugins/advance-wc-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advance-wc-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advance-wc-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/advance-wc-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advance-wc-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advance-wc-analytics/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [typeerror](https://wordpress.org/support/topic-tag/typeerror/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ingo Steinke (openmindculture)](https://wordpress.org/support/users/openmindculture/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-windowo-is-not-a-function/#post-18100187)
 * Status: resolved