Support » Plugin: Google Tag Manager for WordPress » Add to cart data is not getting tracked prorperly

  • Hello,

    Hope you doing well,

    My client website had a problem with his theme as it was not compatible with your plugin & I added all the relevant classes and hooks as per the documentation on your website. But still, the problem is session with add to cart in shopping behavior shows wrong data. Here is the screenshot http://prntscr.com/q862ct. Also, When gtm4wp.addProductToCartEEC event is fired it shows undefined datalayer values like no productid, price, currency etc are defined of product that I add to cart.

    I would be grateful for any help you can provide to me for this case.

    Thanks
    Sunny

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I checked your site.
    This is a single product page:
    https://www.form2fab.com/produit/xnurbs_rhino3d/

    Here, you will need to add the single_add_to_cart_button class to the button as it only includes currently "button alt btn"

    This is a product list page:
    https://www.form2fab.com/shop/

    Here I do not see that the standard WooCommerce theme hooks are being called as each product box should include a hidden <span> element with product data. This is why your add to cart event does not include proper product data.

    Thread Starter sunnyag16

    (@sunnyag16)

    Thanks for your response.

    Few Quick questions:

    The data layer is undefined at both add to cart button at the category as well as the individual product page.

    Also, is it mandatory to make add to cart button as a button HTML tag or we can use anchor tag? because on category and product page (The button above the quantity button) I have add to cart button in the anchor html tag.

    Thread Starter sunnyag16

    (@sunnyag16)

    How Can I change sequence number of checkout behaviour steps? I would like to keep payment type at step 2 rather than 4 because my client is selling digital product which doesn’t require any shipping

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    This is currently only possible if you edit the code of this plugin but after a version update, you will need to re-apply this change again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add to cart data is not getting tracked prorperly’ is closed to new replies.