Hi developers of Amely,
For the website https://monsak.nl I tried to setup the whole enhanced e-commerce within the theme of Amely. I used the 'DuracellTomi's Google Tag Manager for Wordpress' plugin so that I can add datalayers to the code.
Everything was setup correctly and was working good, except the AddToCart function. Unfortunately, I was unable to trigger the AddToCart and I didn’t find out what the problem was. Which is very weird, because RemoveFromCart do work..
This seems to use a return false statement which breaks other event handler codes, including the code in GTM4WP which results in a missing add to cart event tracking.
He asked me if I can communicate with the theme developer to use event.preventDefault()instead of return false?
You can look for further details: https://wordpress.org/support/topic/addtocart-dont-trigger-on-product-page/
Is it possible to do that for me so that I can track everything properly? Or do you have a another solution to track the AddToCart? I think that more people will encounter this problem while using the Amely theme.
I would like to hear from you!
I tried to remove item from the cart and it still working well.
It is not about the function of removing something from my shopping cart. That's working! Even as the AddToCart!
But it is about getting these elements measurable with Google Tag Manager. I want to make the element AddToCart measurable. Is that possible?
Look for instructions in the link below!
We has not tested with Google Tag Manager. Almost our customer are using SEO Yoast and Google Analytic to track the code: https://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/