• Good day, I’m useign this plugin to integrate TGM, everything looks fine, events are fired with the proper datalayer most of the times, I have only a issue on the homepage, where the add to cart event is fired properly when user clicks on the button, but the product added in the datalayer has no name, price: 00.0, no category, etc.
    While the same click (add to cart) in the product details page is working as expected.
    Do I missed something?

    Thanks in advance.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter peorthyr

    (@peorthyr)

    just checkin that in other “list” pages, this problem seems not to be present.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks for the report, this is so far a known issue, GTM4WP currently can not handle properly product lists generated by Gutenberg blocks. I am doing my best to add support for this but it is not that trivial at least for now.

    Thread Starter peorthyr

    (@peorthyr)

    Hi Thomas, thanks for the quick response!
    I supposed that the problem was something like you say, I have a question, is there a way to make the plugin handle lists of products outside the standard procut lists? I mean what does it need? something pushed into the datalayer in those pages? or a particular structure of the product element? Since I can modify quite anything on my sites, what do you need to be there in order to make the plugin works?

    thanks in advance!

    Plugin Author Thomas Geiger

    (@duracelltomi)

    For the record: initial support for WooCommerce Blocks has been added into the dev version of GTM4WP:
    https://github.com/duracelltomi/gtm4wp/commit/6a7807e5fd0217c4978bd3b360a8f087f8594801

    It will cover most blocks rendered on the server side but not the “All Products” block which is rendered in the browser and because of this it requires very different technique to handle.

    For standard site elements (=not generated by WP blocks) you need to make sure that every WooCommerce hook is in place and your HTML is not much different from the HTML code of the Storefront theme:
    https://gtm4wp.com/how-to-articles/how-to-make-your-wordpress-theme-compatible-with-enhanced-ecommerce-tracking

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add_to_cart event on homepage has empty datalayer’ is closed to new replies.