• Resolved awaaxyb

    (@awaaxyb)


    Hello,

    I wanted to know if it’s possible to make an update and add the event add to whishlist

    After,
    Does GTM kit is compatible with custom loader ? ex stape.io custom loader option

    And last one,
    I have problem for unknown reason i don’t get the checkout events like begin checkout, add shipping info and add payment info

    that’s weird. It is due to the fact i use a custom checkout ( WC Checkout )
    What can u do or what can i do ?

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 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: FS797-C9D78

    Thread Starter awaaxyb

    (@awaaxyb)

    Yet done for FS797-C9D78

    For custom loader does it works with stape ?

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    The add_to_wishlist event is supported if the button contains the class .add_to_wishlist

    Stape.io is supported

    You haven’t defined the checkout page. Go to Admin > WooCommerce > Settings > Advanced: select your cart and checkout pages

    Thread Starter awaaxyb

    (@awaaxyb)

    Hi,

    Checkout page and cart page are defined on my backend, and this pages are well connected to other version of themselves but in other languages, we use polylang.

    Maybe can’t u see it because your setting works only for default woocommerce installations with single countries.

    you sure it’s not due to the WC Checkout ?

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    GTM Kit is using the WooCommerce function is_checkout() to detect if the user is on the checkout page. If your checkout is not compatible with this function GTM Kit can not know when the user is on the checkout page.

    Thread Starter awaaxyb

    (@awaaxyb)

    Only the event begin_checkout works but not add_shipping_info & add_payment_info
    I contacted WC Checkout dev, they say this :

    You’d need a custom code implementation to add Google Tag Manager events to the checkout form.

    You can use a hook like:
    woocommerce_before_checkout_form

    or premium plugin Google Tag Manager for WooCommerce PRO

    For the add_to_wishlist event, why did u choose the .add_to_wishlist class ? How are you sure any theme developper use this class? We use well know commerce kit theme here is the html for the wishlist, we see the class .commercekit-save-wishlist

    <div class="commercekit-wishlist mini" data-product-id="13510"><a href="#" class="commercekit-save-wishlist" data-product-id="13510" data-type="list" title="Wishlist" aria-label="Wishlist"><em class="cg-wishlist"></em><span></span></a></div>

    Thanks

    • This reply was modified 6 months, 3 weeks ago by awaaxyb.
    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    I have tested your checkout and add_shipping_info is fired if the shipping method is changed. The add_payment_info event is fired if payment method is changed. If no changes have been made they are both fired when the Complete order button is clicked. This is as expected.

    The WooCommerce Storefront theme is used as standard. Both WC and Storefront use .add_to_cart on the ‘Add to cart’ button, so .add_to_wishlist is the simple and logic choice for the ‘Add to wishlist’ button. YITH WooCommerce Wishlist, which is the most popular wishlist plugin also uses .add_to_wishlist

    Thread Starter awaaxyb

    (@awaaxyb)

    I can’t see this event in gtm preview mode how are u doing ?
    I think it’s better to fire add_shipping_info when visitor enter his address and add_payment_info when customer enter payment step

    For add_to_wishlist, it’s possible to add the commerkit class ?
    Thanks

    • This reply was modified 6 months, 3 weeks ago by awaaxyb.
    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    I’m injecting my container tag on to your site. Other than that i have made no changes and this does not change the events that are sent to the container.
    After filling out the address i click the ‘continue to shipping’ and select premium shipping, which triggers the add_shippoing_info event. https://imgur.com/a/nlNknme

    I agree that it would be better to fire the event when the address has been entered but this is not possible to do in a way that is compatible with alle themes and plugins. You can do this yourself by customizing woocommerce-checkout.js to your needs. This is not complicated task for a developer.

    I can’t add custom classes for all themes and plugins. It would make the JavaScript bloated and slow. You should contact the support of your theme or plugin that generates the add to wishlist button and ask them to add the generic add_to_wishlist class

    Thread Starter awaaxyb

    (@awaaxyb)

    Ok Torben we are not able to get the events, we only get begin_checkout. When it fire add_payment_info it’s more an hasard and unknown reason for us. We don’t understand how you are doing because we do exactly the same has you.

    Another of our site that is running GTM Kit to have the same problem too, we check our GTM and it’s correctly configured with all GA4 ecommerce events and basic events.


    About woocommerce-checkout.js, it will be overrided if we update the plugin, any possibility to make a child gtm kit ?
    Thanks

    We contacted theme developper about the add_to_wishlist

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    You should not overwrite woocommerce-checkout.js in the plugin.

    Go to GTM Kit > Integrations > WooCommerce > Advanced settings and activate ‘Dequeue the default JavaScript’. This will prevent the default woocommerce.js and woocommerce-checkout.js from loading. Then you can enqueue your own customized scripts in functions.php of your theme or a functionality plugin. https://developer.www.ads-software.com/reference/functions/wp_enqueue_script/

    Thread Starter awaaxyb

    (@awaaxyb)

    Ok for the moment we haven’t a dev so we just want to have the events working, does cache plugin can prevent us from the add_shipping_info and add_payment_info to work ?
    We just don’t understand why begin_checkout fire and not the others. maybe it’s coming from our GTM config ? We are looking actually
    Thanks

    • This reply was modified 6 months, 3 weeks ago by awaaxyb. Reason: checking gtm config before
    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    The begin_checkout event is created in PHP and included the HTML document of the checkout page. add_shipping_info and add_payment_info are created using the JavaScript in woocommerce-checkout.js. A cache plugin like LiteSpeed Cache may interfere with the JS depending on the configuration.
    Since i was able to fire the events it may be worth testing in an incognito browser to make sure all cache and cookies are cleared

    Thread Starter awaaxyb

    (@awaaxyb)

    But you test with your GTM Configuration if I understand, so i will actually check mine and maybe open a new preview with the default GTM Kit template.

    I already tested in Private Browser navigation and disable cache & clear cookie. I just don’t get it how are u using the private window for gtm preview

    Thanks

    Thread Starter awaaxyb

    (@awaaxyb)

    Actually I test with GTM Kit default template and re-run a test then it still doesn’t work properly on the 2 site.
    So after this, I just try another Datalayer plugin and i yes every events works with the new datalayer plugin…just not the add_to_wishlist because of the class missing. Can we make a google meet so we can show you? any email to contact you ? Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘new event, custom loader & checkout step events’ is closed to new replies.