Product Details aren’t Sent in dataLayer – Oxygen Custom Made Website
-
Hi,
I’ve been searching and reading the docs for a while and I did a lot of tests, but just can’t resolve this issue. I’m pretty aware of why it’s happening, but can’t resolve it all by myself.
I’ve made a site with Oxygen builder, so it has a lot of custom code and some of the Woocommerce pages are custom made. And that’s why I have a problem in the first place. I know that. Some hooks aren’t fired natively and maybe some classes are missing from the Add To Cart buttons or product wrappers.
The problem is that product details are missing in the dataLayer when the add_to_cart event fires. So, I am seeing events, that is OK, but the values are missing (item_id value, item_name value, etc.). It’s probably because I can’t “call” class: gtm4wp_productdata with all that data about the product.
You can check it on https://pokanails.com/shop/.
I’ve read this guide https://gtm4wp.com/how-to-articles/how-to-make-your-wordpress-theme-compatible-with-enhanced-ecommerce-tracking and tried to implement the WC actions and filters on e.g. Shop page or on the Single Product page, but without luck. I don’t know where to put it on the page. And which ones. When I put this hook: woocommerce_after_add_to_cart_button just after Add To Cart button, nothing happens on the front end, but I see some error notice inside my builder and it’s related to this plugin. So, probably I’m on the right track, but don’t know how to implement it properly.
On the other side, I didn’t tweak a lot the Cart page, so adding and removing products there is properly set up in dataLayer.
Can anyone push me in the right direction in this case? Thank you in advance!
The page I need help with: [log in to see the link]
- The topic ‘Product Details aren’t Sent in dataLayer – Oxygen Custom Made Website’ is closed to new replies.