• gcsimos

    (@gcsimos)


    I have a problem with duplicate view_item and add_to_cart events. I have narrowed down the source of the duplicate events to the plugin: Google for Woocommerce.

    Both plugins are necessary. Is there something I can do to avoid this?

    I found an answer for a similar issue with a different plugin and they suggested changing the dataLayer name. I tried this using GTM4WP’s Advanced settings, but when I do it GTM4WP stops generating a dataLayer, events, etc. What am I doing wrong?

    Many thanks!

Viewing 1 replies (of 1 total)
  • weaselnerd

    (@weaselnerd)

    The solution I found to this issue was to create a Data Layer variable for eventModel, and on my trigger(s) filter that its value equals “undefined”.

    This works because gtag() events (like those fired by Google for WooCommerce) store their values under eventModel in the data layer. The dataLayer.push() used by GTM4WP does not generate an eventModel variable.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.