replicantshirts
Forum Replies Created
-
Hi James,
Good news — I believe we finally found and fixed the issue.
I enabled Consent Mode in Site Kit, installed WP Consent API, and then went through the Complianz wizard again so that it detected the new integration.
After that, Tag Assistant started showing consent update events correctly. When I accept the cookie banner,
analytics_storagenow changes fromdeniedtogranted.I then tested
add_to_cartagain in DevTools. The event is now sent toG-3ECJGKTEL7withgcs=G111, including the product data. I also repeated the test using a mobile hotspot so that the session was not treated as internal traffic.Most importantly, GA4 Realtime is now showing both
add_to_cartandbegin_checkoutcorrectly.So it looks like the root cause was the consent configuration: Consent Mode was not enabled in Site Kit and WP Consent API was not installed, so accepting the Complianz banner was not updating the Analytics consent state correctly.
Thank you very much for your patience and for helping me track this down. Your checks were what led us to the consent issue in the first place.
Everything appears to be working correctly now.
Hi James,
I did another test using a mobile hotspot, so the session was not treated as internal traffic.
The
add_to_cartrequest is being sent correctly toG-3ECJGKTEL7, and the request contains the product data. However, even after accepting cookies, DevTools still showsgcs=G100.I also checked the session in Tag Assistant. Under Consent it shows:
“Consent not configured”
“The default consent state has not yet been defined.”Could this consent configuration be related to why
add_to_cartis being sent but still does not appear in GA4 Events or Ecommerce reports?Thanks again for your help.
Hi James,
Thank you for checking again and for clarifying the
enparameter.I’ll keep Google Analytics for WooCommerce active for now, since in my own A/B test the
add_to_cartcollect request appeared only when that plugin was active.Everything is working correctly at the moment, so I’ll leave the current configuration unchanged.
Thanks again for all your help!
Hi James,
Thanks again. I’ll leave the current configuration unchanged while you run your tests.
I really appreciate you looking into this further.
Hi James,
I found one additional detail that may be useful.
After disabling Google Analytics for WooCommerce as discussed, I performed a clean test in an incognito session using Chrome DevTools. Adding a product to the cart via AJAX generated no GA4
collectrequest foradd_to_cart.I then re-enabled Google Analytics for WooCommerce and repeated exactly the same test. This time a GA4
collectrequest appeared with:en = add_to_cartSo on my site, with the current configuration,
add_to_cartonly appears to be sent when Google Analytics for WooCommerce is active.I thought this might be useful information for your investigation.
Thanks again!
Thank you very much, Adam.
I really appreciate the support and the kind message.
All the best to you and the Site Kit team as well!Hi James,
Thank you very much for all your help throughout this process. I really appreciate the time and patience you’ve put into investigating the issue and guiding me through all the different tests.
I’m very grateful that you were able to help me find a working solution, and I’m also glad that the information from this case may be useful for improving Site Kit in the future.
I’ll definitely keep Site Kit in mind for future questions, and I’ll also take a look at the Site Goals feature you mentioned.
Thanks again for all your support. I really appreciate it.
Best regards!
Hi James,
Thank you very much for the clarification and for all the help throughout the troubleshooting.
I’ll keep Site Kit as the main Analytics integration and disable the separate Google Analytics for WooCommerce plugin for now. I’ll also re-enable the Analytics exclusion in Site Kit using the option to exclude users who can write posts, as you suggested.
I’ll keep the Ajax add to cart plugin active, since this is now working correctly on the product pages.
Everything seems to be functioning normally now. Thanks again for your patience and for helping me track this down.
Best regards!
Hi James,
Great, thank you very much for confirming that
add_to_cartis now firing correctly.I’ll keep the Ajax add to cart for WooCommerce plugin active, as it now works correctly on both desktop and mobile. I also hid the duplicate “View cart” link with CSS, without modifying the Elementor templates.
Before we close the troubleshooting, I’d like to confirm two things:
- Should I keep the separate Google Analytics for WooCommerce plugin active, or should I disable/remove it and rely only on Site Kit? Earlier you noticed two Analytics integrations running on the site.
- Can I now re-enable “Exclude Analytics for logged-in users” in Site Kit, so my own administrator activity is not counted?
Thanks again for all your help!
Hi James,
I’ve reactivated the Ajax add to cart for WooCommerce plugin and successfully hidden the duplicate “View cart” link using CSS, without modifying my Elementor templates.
I’ve tested it on both desktop and mobile with variable products. I can select a size and add a product to the cart without reloading the page, and only one “View cart” button is displayed.
However, I still can’t see the
add_to_cartevent in GA4 Realtime, although page views and other events are being recorded.The AJAX plugin is currently active, so you can test the individual product pages whenever convenient.
Could you check whether the
add_to_cartevent is now firing correctly using your developer tools?Thank you again for your help!
Hi James,
I’ve installed and tested the Ajax add to cart for WooCommerce plugin as requested.
The plugin works on individual product pages, including variable products. I can select a size and add the product to the cart without reloading the page.
However, I noticed two issues:
- Two “View cart” buttons appear after adding a product.
- I still couldn’t see
add_to_cartin GA4 Realtime. I also checked Chrome DevTools, but the request I inspected was aform_startevent, so I haven’t been able to confirm whetheradd_to_cartis firing.
I’ve temporarily deactivated the AJAX plugin. The duplicate “View cart” button disappears, but the product page reloads again when adding an item.
I’d prefer to avoid modifying my existing Elementor product pages if possible.
What would you recommend checking next?
Thanks again for your help!
Hi James,
I’ve created a temporary page with a simple product that can be added directly to the cart using AJAX, without opening the individual product page.
Here’s the URL:
https://replicantshirts.com/ajax-test-support/I’ve tested it from my mobile phone using mobile data, since my home IP is excluded from GA4.
The product was successfully added to the cart without reloading the page. GA4 Realtime detected my visit to the test page and received
page_view,user_engagement,scrollandsession_startevents.However,
add_to_cartstill did not appear in GA4 Realtime.The test page is publicly accessible, so you can perform your own checks whenever convenient.
Please let me know what you find.
Thanks again for your help!
Hi James,
I completed the test in Troubleshooting Mode with only WooCommerce and Site Kit enabled.I checked the GA4 requests directly in Chrome DevTools using the
collectfilter. After clicking “Add to cart” on the simple test product, only two GA4 requests appeared: onescrollevent and onepage_viewevent.The
page_viewrequest contains this page URL:https://replicantshirts.com/producto/test-product/?product_added_to_cart=6016&quantity=1However, the event name (
en) ispage_view, and noadd_to_cartrequest is sent.So the product is added successfully and the page reloads with the
product_added_to_cartparameter, but Site Kit does not generate theadd_to_cartevent.Please let me know what you would like me to check next.
Thanks!Hi James,
I created the simple product without variations as requested. It is public but hidden from the catalogue.URL: https://replicantshirts.com/producto/test-product/
I tested it myself from my mobile connection. Unfortunately, GA4 Realtime is not detecting any events from this test, including the page view, and
add_to_cartis also not firing.I’ve left the product available at the URL above so you can test it from your side.
Thanks!Hi James,
I disabled the “Exclude Analytics for logged-in users” setting as requested.I also tested again from my mobile connection, but this time GA4 Realtime is not receiving any events at all, including
page_view, so I cannot confirm theadd_to_carttest from this session.I have left all settings unchanged so you can check the site in its current state.
Thanks!