Hello,
I’m experiencing an issue with the Woodmart theme and Google Tag Manager integration.
When a customer clicks the “Add to Cart” button, the add_to_cart event is pushed to the dataLayer — but instead of sending only the selected product, the dataLayer sends all products from the store.
Example from dataLayer:
{
event: “add_to_cart”,
ecommerce: {
currency: “BRL”,
value: 94,
items: [ /* contains all products instead of just the one added */ ]
}
}
I confirmed the issue is related to the theme by switching to the default Hello Elementor theme. In that case, the event works perfectly and sends only the selected product to the dataLayer.
I also tried:
Disabling the “Track e-commerce” option in the GTM4WP plugin;
Adding a manual dataLayer.push in PHP;
Clearing caches and testing in incognito mode;
Making sure only one product is actually added via Ajax;
Unfortunately, the problem only happens when the Woodmart theme is active, which suggests a conflict in the theme’s Ajax cart or JS that populates the dataLayer.
Can you help me find a solution or identify where the theme might be interfering with the correct dataLayer output for add-to-cart events?
Thank you!