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 2 years, 1 month ago by
josemi20.
Please go to ‘GTM Kit > Help > Support > Share system data with the GTM Kit support team’ and enter the support ticket: FS787-C93CD
I just did it, sorry for the delay, I didn’t get the notification
@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.
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 2 years, 1 month ago by
josemi20.
-
This reply was modified 2 years, 1 month ago by
josemi20.
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
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?
OK. I have reproduced the problem and it is caused by a bug. I will make a fix and a new release.
@josemi20 I have released version 1.19.1 with a bugfix
Thanks for the fix, this afternoon I will review it on the 3 websites and give you feedback.
Everything very good on the 3 pages @torbenlundsgaard, thank you very much! The involvement is appreciated, the plugin is perfect!
@josemi20 You are welcome.