Issue with Data Layer Implementation in “Add to Cart” Events
-
We are currently facing a critical issue on our website, aloise.com.ar, which involves the integration of WooCommerce with Google Tag Manager (GTM) and Google Analytics 4 (GA4). We are using the GTM4WP – A Google Tag Manager plugin for WordPress to handle our data layer implementation. Below are the specific problems we’ve encountered:
- Data Layer Error for WooCommerce “Add to Cart” Event: When a customer adds a product to the cart, instead of logging only the selected product, all products visible on the screen—including related products on the single product page—are being recorded. This behavior is leading to inaccurate data being sent to GA4, which is significantly affecting our ability to analyze customer behavior and track conversions.
- Empty Data Layer: We’ve also identified that one of the
data_layer
entries is being sent empty from the site. While we’re unsure if this is directly related to the WooCommerce integration, we believe it may be contributing to the inaccurate data collection.
Our primary concern is the discrepancy in the data when the “Add to Cart” action is triggered. This inconsistency is distorting our reports and impairing our data-driven decision-making process.
We need your assistance with:
- Investigating and resolving the issue where WooCommerce’s
data_layer
is logging multiple products instead of just the one added to the cart. - Examining the cause of the empty
data_layer
entry and determining whether this is related to the WooCommerce functionality or its integration with the GTM4WP plugin.
We would greatly appreciate your prompt attention to this matter and any guidance you can provide to help us resolve these issues.
Best regards,
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.