Add to Cart not tracked on product archive pages (add_to_cart_button)
-
We’re running into an issue with GTM4WP that we can’t seem to resolve and we were hoping you could help us out.
On individual product pages, the Add to Cart event is tracked correctly in Google Tag Manager.
The button there uses the class:single_add_to_cart_buttonExample: https://ideefabriek.com/product/kraskaart-3st-met-envelop-zwangerschapsaankondiging-kerst-ho-ho-ho/
This trigger fires as expected and everything works fine.
However, on the product overview / archive pages, the Add to Cart buttons use the class:
add_to_cart_buttonThese clicks are currently not being picked up in GTM.
Example: https://ideefabriek.com/alle-producten/
According to your documentation, this should work out of the box:
https://gtm4wp.com/gtm4wp-for-developers/how-to-make-your-wordpress-theme-compatible-with-enhanced-ecommerce-tracking
(specifically the section at the bottom of the page).Our questions:
- Are there additional requirements or theme-specific adjustments needed for
add_to_cart_buttonclicks on archive pages? - Is there something we might be missing in the GTM4WP or GTM setup to make this work?
We’d love to understand what’s causing the difference in behaviour between single product pages and overview pages.
Thanks in advance for your help!
The page I need help with: [log in to see the link]
- Are there additional requirements or theme-specific adjustments needed for
You must be logged in to reply to this topic.