GTM4WP filters without container loading
-
First of all, thank you for your excellent work on GTM4WP – we’re using the plugin extensively.
We’re currently facing a technical challenge in combination with Complianz as our Consent Management Platform. We would like to use GTM4WP to add additional parameters (such as discount) to existing eCommerce events like view_item, without pushing an additional event. Our goal is to extend the existing items array, not replace it.
We found that GTM4WP provides useful PHP filters such as gtm4wp_woocommerce_gtm_eec_product_array, which seem perfect for this purpose.
However, in our setup:
– Complianz handles cookie consent v2 and only loads the GTM container after consent.
– The “Load container” setting in GTM4WP is turned off (as recommended when using Complianz).
– As a result, GTM4WP’s filters don’t run – understandably so, since GTM4WP isn’t actively outputting anything until the container is loaded.
Our question:
Do you know of a workaround or recommended approach to still inject data (such as discount) into GTM4WP’s existing dataLayer pushes, without loading the container via GTM4WP?We specifically want to avoid creating new custom events, and only wish to hook into and enrich the existing GTM4WP eCommerce data.
Thank you very much for your time and any suggestions you might have!
Best regards,
Amazing
The topic ‘GTM4WP filters without container loading’ is closed to new replies.