• Resolved duifs

    (@duifs)


    I just switched from GTM4WP to GTM Kit today, and while testing with Google Tag Manager’s preview function, I noticed that the add_to_cart event is being triggered twice, even though I only clicked the button once. Any idea why this is happening and how to fix it? Thanks!

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    Please go to ‘GTM Kit > Help > Support > Share system data with the GTM Kit support team’ and enter the support ticket: FS822-7AF77

    Thread Starter duifs

    (@duifs)

    Thanks for getting back to me so quickly. I’ve just submitted the ticket.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    I can confirm that the add_to_cart event is being triggered twice.

    It looks like the plugin Google for WooCommerce has attached an event to the add to cart button and I think it is also triggering the add_to_cart event. Please try and deactivate the Google for WooCommerce and see if ti fixes the problem.

    If it does fix the problem and you need both plugins to fire the add_to_cart event you can change the datalayername that GTM Kit uses in GTM Kit > General > Container > General Container Settings > dataLayer variable name.

    Please be aware that changing the datalayer name may be a problem some cookie pop-up managers, so test it.

    Thread Starter duifs

    (@duifs)

    Thanks for your quick response. I really appreciate your help in figuring out the cause.

    As you suggested, I deactivated the Google for WooCommerce plugin and retested. The add_to_cart event was triggered correctly, only once, and the issue was resolved.

    However, I can’t keep the Google for WooCommerce plugin deactivated since I use it to connect to my Google Merchant Center and run Google Shopping ads. I wasn’t aware that the plugin was triggering the add_to_cart event, and I couldn’t find any related settings in the plugin. Do you know how to stop the plugin from triggering the add_to_cart event? Or should I reach out to the Google for WooCommerce support team for help?

    Thanks again!

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    You can try changing the datalayer name as described, but aware that some cookie pop-up do not support this. If it doesn’t work you should reach out the Google for WooCommerce plugin support

    Thread Starter duifs

    (@duifs)

    So I can change the datalayer name to anything I want? I’ll definitely reach out to the Google for WooCommerce plugin support.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    yes, anything. I.e.: datalayer_2

    Thread Starter duifs

    (@duifs)

    Got it. Really appreciate your help again.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    You are welcome.

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