Resolving Common Site Kit by Google and WooCommerce Conflicts
Content
Many WordPress site owners use both Site Kit by Google and WooCommerce to manage their analytics and e-commerce. However, these two powerful plugins can sometimes conflict, leading to broken checkout pages, JavaScript errors, and data reporting issues. This guide explains the most common conflicts and provides steps to resolve them.
Common Symptoms of Conflict
Based on community reports, conflicts between Site Kit and WooCommerce often manifest in the following ways:
- JavaScript Errors on Checkout: Errors like
Uncaught TypeError: jQuery.blockUI is not a functionorCannot read properties of undefinedthat prevent payment methods like Google Pay or Apple Pay from working. - Broken AJAX Add-to-Cart: The cart fails to update automatically after a product is added, requiring a manual page refresh.
- Fatal PHP Errors: Critical errors on order confirmation pages, such as
Call to a member function is_type() on bool. - Data Loading Failures: The "Most popular products by pageviews" widget fails to load data when WooCommerce is active.
- Incorrect Data Tracking: Prices sent to Google Analytics are multiplied, or SKU information is missing from
add_to_cartevents.
Why These Conflicts Happen
These issues typically arise from two main areas:
- Enhanced Conversion Tracking: A powerful feature within Site Kit's Analytics module, Enhanced Conversion Tracking injects JavaScript to track user behavior. This can sometimes interfere with WooCommerce's own scripts, especially on complex checkout and cart pages that rely heavily on AJAX and jQuery.
- Plugin Version Incompatibility: Updates to either plugin can temporarily introduce new bugs or change how scripts are loaded, leading to conflicts until a patch is released.
How to Troubleshoot and Resolve Conflicts
1. Disable Enhanced Conversion Tracking (A Common Fix)
This is the most frequent solution for JavaScript-related issues, such as broken AJAX add-to-cart functionality or checkout errors.
- In your WordPress dashboard, navigate to Site Kit > Settings > Analytics.
- Find the Enhanced Conversion Tracking option.
- Toggle the switch to disable the feature.
- Clear your site and browser cache, then test your checkout and cart pages to see if the issue is resolved.
2. Perform a Conflict Test
If disabling the feature doesn't work, a broader conflict test can help identify the culprit.
- Install the Health Check & Troubleshooting plugin.
- Enable its Troubleshooting Mode. This will deactivate all plugins for your user session only, while keeping the site normal for visitors.
- Reactivate only WooCommerce and Site Kit by Google.
- Check if the problem persists. If it does, the conflict is between these two plugins. If it doesn't, reactivate your other plugins one-by-one to find the third plugin causing the issue.
3. Check for Known Bugs and Updates
Some issues, like fatal PHP errors or incorrect price formatting, are known bugs that have been reported to the Site Kit development team. These often require an official plugin update to fix.
- Ensure both WooCommerce and Site Kit by Google are updated to their latest versions.
- Keep an eye on the official WordPress support forum for Site Kit for updates on known issues.
4. Provide Details for Further Help
If you are still stuck, you will often need to provide specific information to get help from the community. Be prepared to share:
- Your Site Health Information (found under Tools > Site Health > Info).
- The exact text of any JavaScript errors from your browser's console (F12).
- The exact text of any PHP errors from your WordPress debug log.
- The URL of a page where the error occurs.
By systematically working through these steps, you can identify and resolve most conflicts between Site Kit by Google and WooCommerce, restoring full functionality to your online store.
Related Support Threads Support
-
jQuery Error with WooPayment, Google Pay & Apple Payhttps://wordpress.org/support/topic/jquery-error-with-woopayment-google-pay-apple-pay/
-
Woocommerce add to cart events not workinghttps://wordpress.org/support/topic/woocommerce-add-to-cart-events-not-working/
-
Conflict with WooCommerce AJAX Add to Carthttps://wordpress.org/support/topic/conflict-with-woocommerce-ajax-add-to-cart/
-
Feature Request for Improved Product Feed Status Synchronization in SiteKithttps://wordpress.org/support/topic/feature-request-for-improved-product-feed-status-synchronization-in-sitekit/
-
Checkout – jQuery problemhttps://wordpress.org/support/topic/checkout-jquery-problem/
-
“Most popular products by pageviews” data loading failedhttps://wordpress.org/support/topic/most-popular-products-by-pageviews-data-loading-failed/
-
WooCommerce cart page & checkout fatal errorshttps://wordpress.org/support/topic/woocommerce-cart-page-checkout-fatal-errors/
-
Data Error Fail appears on the Most popular products key metrics widgethttps://wordpress.org/support/topic/data-error-fail-appears-on-the-most-popular-products-key-metrics-widget/
-
Fatal error: Call to is_type() on bool in Site Kit WooCommerce trackinghttps://wordpress.org/support/topic/fatal-error-call-to-is_type-on-bool-in-site-kit-woocommerce-tracking/
-
add_to_cart event sends 48.99 as 4899https://wordpress.org/support/topic/add_to_cart-event-sends-48-99-as-4899/
-
Added_to_cart TypeError on single product / variation pageshttps://wordpress.org/support/topic/added_to_cart-typeerror-on-single-product-variation-pages/
-
get_formatted_product() Errorhttps://wordpress.org/support/topic/get_formatted_product-error/
-
Uncaught errors after updatehttps://wordpress.org/support/topic/uncaught-errors-after-update/
-
Woocommerce entra en conflicto con la métricas clavehttps://wordpress.org/support/topic/woocommerce-entra-en-conflicto-con-la-metricas-clave/
-
Marionette not defined issue on Woocomerce product page with variants and Ninjahttps://wordpress.org/support/topic/marionette-not-defined-issue-on-woocomerce-product-page-with-variants-and-ninja/
-
Fatal erro using latest version: Google Site Kit passes NULL as Order Idhttps://wordpress.org/support/topic/fatal-erro-using-latest-version-google-site-kit-passes-null-as-order-id/
-
Impossible to add product GTINhttps://wordpress.org/support/topic/impossible-to-add-product-gtin/
-
In to add_to_cart event, sku is not capturedhttps://wordpress.org/support/topic/in-to-add_to_cart-event-sku-is-not-captured/
-
Woocommerce conflicts with Key Metricshttps://wordpress.org/support/topic/woocommerce-conflicts-with-key-metrics/