• We Upgraded WordPress, Woocommerce and the Plugin to the newest available Version.

    After getting Consent, etc. to work we have the following Situation: On normal Pages, the add_add_to_cart event is triggered correctly and send to Analytics. On Woocommerce Pages the add_to_cart event is not triggered and not transportet when adding the product to the cart.

    The following error can be found in the console:

    Uncaught TypeError: window[o] is not a function
    t XXX/wp-content/cache/min/1/wp-content/plugins/woocommerce-google-analytics-integration/assets/js/build/main.js?ver=1732089184:1
    C XXX/wp-content/cache/min/1/wp-content/plugins/woocommerce-google-analytics-integration/assets/js/build/main.js?ver=1732089184:1
    C XXX/wp-content/cache/min/1/wp-content/plugins/woocommerce-google-analytics-integration/assets/js/build/main.js?ver=1732089184:1
    C XXX/wp-content/cache/min/1/wp-content/plugins/woocommerce-google-analytics-integration/assets/js/build/main.js?ver=1732089184:1

    We are using WP Rocket and Varnish, but also appears on Staging System with completely diabled caching.

Viewing 1 replies (of 1 total)
  • Plugin Support Jonayed Hosen (woo-hc)

    (@jonayedhosen)

    Hi @advps ,

    I’m sorry to hear about the issue you’re experiencing. The error message “Uncaught TypeError: window[o] is not a function” usually occurs due to conflicts between the plugin’s JavaScript and other elements on the site.

    Since you mentioned that the staging version of the website is also affected, even with caching disabled, I’d like to confirm: Is the WP-Rocket plugin activated, even though caching is disabled? If so, there could be an issue with WP-Rocket and its interaction with Google Analytics and Google Ads tracking. This issue is often caused by delays in JavaScript execution.

    You can find more information about this issue and possible solutions in this article: WP Rocket – Google Analytics & Google Ads Tracking Issues.

    If this doesn’t resolve the issue, I’d recommend temporarily deactivating all plugins except WooCommerce and the Google Analytics Integration plugin. Additionally, please switch to a default WordPress theme, such as Storefront, to see if the issue persists. If there’s any custom code added to your site, please remove that as well.

    Please check it out and let us know if this is the cause of the issue.

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