• Resolved josemi20

    (@josemi20)


    Hello!

    I am trying to integrate GTM Kit with Complianz for the use of consent mode V2 in an online store with WooCommerce.

    According to the Complianz integration guide for the GTM4WP plugin, you must disable the option to integrate the GTM container and keep only the data layer to perform the container integration with them (there is a guide on their page for this). This option is also contemplated in GTM Kit in its configuration, not injecting the container, so I assumed that it could be used for this integration.

    The problem I am having is that when I disable the container integration from GTM KIT, the data is maintained in the data layer but the events are not being detected correctly in the GTM preview mode nor does anything reach GA4. The only thing I have been able to verify is that the events in preview mode of GTM view_item, view_cart, begin_checkout jump, but nothing reaches GA4.
    Do I need to configure something else or am I skipping a step? Or is it not possible to carry out this integration?
    It would be great to be able to integrate with this type of plugin to continue maintaining GTM Kit with the new laws, since it seems much better to me than GTM4WP.

    Thanks!

    • This topic was modified 1 year ago by josemi20.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter josemi20

    (@josemi20)

    I just tested everything a little more thoroughly, these are the results, some events don’t exist on my website so I could not test them.

    Events that don’t jump in tag assistant, so not in ga4 in debug view:
    view_item_list, select_item, add_to_cart, remove_from_cart, add_payment_info, add_shipping_info

    Events that do jump in tag assistant, so also ga4 in debug view:
    view_item, view_cart, begin_checkout, purchase

    Events I can’t test, although I understand that refund and view_promotion may work and add and select may fail:
    add_to_wishlist, refund, select_promotion, view_promotion

    The tag for the events is configured with a regular expression so I rule out errors there, since some jump and others do not.
    add_payment_info|add_shipping_info|add_to_cart|add_to_wishlist|begin_checkout|purchase|refund|remove_from_cart|select_item|select_promotion|view_cart|view_item|view_item_list|view_promotion


    I have looked at the plugin code and I think I understand the differences with those events. Events that fail are pushed to the variable window[datalayerName] and those that do appear are pushed to the variable $data_layer[‘event’]
    I don’t know if there is any solution or they can all be added to $data_layer[‘event’] to be displayed when using the Setting this to Off option will remove the Google Tag Manager container code but the data layer will remain.

    I hope this helps! thank you!


    • This reply was modified 1 year ago by josemi20.
    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: FS787-C93CD

    Thread Starter josemi20

    (@josemi20)

    I just did it, sorry for the delay, I didn’t get the notification

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    @josemi20 I have done some tests on your site and the events that fail are all fired using woocommerce.js. It is not uncommon that these dynamic events are not firing, which is usually caused by incompatible theme changes.

    Before I inwesitigate deeper i would like to know if Complianz is blocking the script or there is a theme incompatibility.

    Could you please test this by deactivating Complianz and check if the view_item_list event is fired on a category page.

    Thread Starter josemi20

    (@josemi20)

    If I activate the Inject Container Code option in GTM Kit, without Complianz I receive all the events.

    If I activate the Inject Container Code option in GTM Kit, with Complianz without injecting the container I receive all the events.

    If I deactivate the Inject Container Code option in GTM Kit, without Complianz, I cannot see in GTM because the preview mode does not connect to me, but from the page in the browser from the console tab, including the dataLayer variable, the view_item_list event does not appear. However, if I visit a product page, view_item appears.

    Product page
    0: {pageType:?‘product-page’,?productType:?‘variable’,?event:?‘view_item’,?ecommerce:?{…}}

    There seems to be no event on this page in the data layer, if I disable code injection.
    Category page with several products
    0: {pageType:?‘product-category’}

    • This reply was modified 1 year ago by josemi20.
    • This reply was modified 1 year ago by josemi20.
    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    view_item_list and add_to_cart are dynamic events which are fired using the JavaScript file woocommerce.js. This file is not loaded on your site and I’m thinking that it is excluded/delayed by Complianz or a pagespeed plugin

    Thread Starter josemi20

    (@josemi20)

    No, I just tested it on a clean site, without cache plugin or complianz to verify. What makes the woocommerce.js javaScript file load is the configuration option that I told you about at the beginning that I have to deactivate.

    View post on imgur.com

    This option makes it load or not load the woocommerce.js file, receiving more or less events, all the events that are in that file, in summary.

    Is there no way to launch woocommerce.js without having that option active?

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    OK. I have reproduced the problem and it is caused by a bug. I will make a fix and a new release.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    @josemi20 I have released version 1.19.1 with a bugfix

    Thread Starter josemi20

    (@josemi20)

    Thanks for the fix, this afternoon I will review it on the 3 websites and give you feedback.

    Thread Starter josemi20

    (@josemi20)

    Everything very good on the 3 pages @torbenlundsgaard, thank you very much! The involvement is appreciated, the plugin is perfect!

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    @josemi20 You are welcome.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Configuration don’t inject container’ is closed to new replies.