Add to Cart event not fire
-
Hello
I install and create tracking with this in plugin in my website but the add_to_cart event in fired. Is there an issue with the plugin and setup, i checked with debug view as well.
-
Hi @atulpaliwal
I understand how important it is to have the add_to_cart event tracking correctly, especially when you’re trying to monitor conversions and behavior using Google Analytics. Let’s work through this.
The add_to_cart event not firing could be due to a few things:
- Theme or AJAX-based cart setup If your theme uses AJAX to add products to the cart without reloading the page, the event may not fire unless explicitly hooked into. The plugin might not automatically capture these custom interactions.
- Missing or incompatible data layer Google Analytics 4 (GA4) relies on a properly structured dataLayer object to send events. If the plugin or theme doesn’t push the correct data to the dataLayer, the event won’t fire.
- Google Tag Manager setup If you’re using GTM, make sure that your add_to_cart trigger and tag are correctly set up. You may also need to enable enhanced eCommerce in your GA settings.
To help troubleshoot further, please share:
- A link to a product page where the add to cart button isn’t firing the event
- Whether you’re using Google Tag Manager or direct GA4 integration
- If possible, your System Status Report via https://pastebin.com
Let me know and I’ll be happy to guide you through getting this resolved!
Hi
Here is the two pages, for your information but the add to cart event is not fire side wide or any of product.
https://www.zerobonline.com/product/zerob-ultra-uv/
https://www.zerobonline.com/product/zerob-recharge-media-salt-tablet-20kg/
Missing or incompatible data layer Google Analytics 4 (GA4) relies on a properly structured dataLayer object to send events. If the plugin or theme doesn’t push the correct data to the dataLayer, the event won’t fire. – Can you help us to know which data layer is missing.
Google Tag Manager setup If you’re using GTM, make sure that your add_to_cart trigger and tag are correctly set up. You may also need to enable enhanced eCommerce in your GA settings. – For that if we are enable tracking with this plugin, is still GTM required.
Website functionality information
Before when the add_to_cart event is proper fired, we use the one click functionality by clicking just on Add to cart button, for now we add one more step to add product in add to cart
Click on add to cart > Name or Number field open (user submit details) > now product will add in the cart
provide me solution accordingly. Thank you!
Hi there!
Thanks for the update. Since you mentioned that you’ve recently added an extra step (Name or Number input) before the product is added to the cart, this custom behavior could be why theadd_to_cartevent is no longer firing automatically.The tracking plugin typically listens for the default WooCommerce add-to-cart action. With the new flow, the product is added via a custom process (possibly AJAX or JavaScript), which the plugin might not detect.
For testing purposes, could you please temporarily remove this additional step and revert the Add to Cart button to its original one-click behavior? This will help determine whether the issue is related to the modification or the plugin setup itself.
To investigate further without affecting your live site, I recommend creating a staging site. This will allow you to safely test by temporarily removing the additional step and reverting the Add to Cart functionality to its original one-click behavior.
You can easily create a staging site using the following plugin:
🔗 WP Staging – Backup & Migration pluginOnce you’ve set up the staging site and tested, please let me know the outcome and we can take it from there.
Hi @atulpaliwal we haven’t heard back from you in a while, so I’m going to mark this as resolved. If you have any further questions, please feel free to start a new thread.
We’d appreciate it if you could take a few moments to review the WooCommerce Google Analytics plugin using the link below:
https://wordpress.org/support/plugin/woocommerce-google-analytics-integration/reviews/
-
This reply was modified 8 months, 1 week ago by
thelmachido a11n.
The topic ‘Add to Cart event not fire’ is closed to new replies.