Releases: duracelltomi/gtm4wp
v1.21 beta1
!!! WARNING !!!
Significant change in WooCommerce integration!
Check your template whether it supports must have hook: woocommerce_thankyou
- Added: new WooCommerce option that allows you to fire the view_item event during page load of a variable product using parent product data.
- Added: item_group_id parameter includes the parent ID of a variable product in WooCommerce
- Updated: purchase event is now fired on the woocommerce_thankyou event. This will move execution time behind consent state checks in most cases making the purchase event working in more cases.
- Added: GTM4WP_WPFILTER_GET_CSP_NONCE (PHP constant) / gtm4wp_get_csp_nonce WordPress filter to add nonce to script tags supporting Content Security Policy (CSP) setups
v1.20.2
- Fix: Wrong ID parameter used tracking product variations (id instead of item_id). Thanks micmaf
- Fix: do not track add_to_cart in product lists when 'Select options' or 'View products' buttons are clicked
- Fix: JavaScript reference error while updating cart count in WooCommerce. Thanks Sakuk3
- Fix: hash customerBillingEmailHash just like orderData.customer.billing.email_hash (for enhanced conversions, use the value in orderData)
- Added: minimum required WooCommerce version (currently 5.0+) is displayed now on GTM4WP admin
v1.20.1
- Fix: do not load GTM container when OFF and console.log OFF. Thanks morvy
- Fix: reverted a change where item_id in ecommerce data layer was converted to numeric type when the value was a numeric value. It will be kept as a string to preserve compatibility with other integrations.
- Fix: JavaScript error when element ID not set correctly in scroll tracking
- Changed: better normalize and hash user data with WooCommerce + orderData variable for enhanced conventions
- Changed: PHP code optimization by hans2103
- Added: New filter to be able to modify data in the orderData variable on a WooCommerce order received page. Filter can be accessed either using the GTM4WP_WPFILTER_EEC_ORDER_DATA constant or the gtm4wp_eec_order_data string.
v1.20
THE BIG CLEANUP RELEASE!
Lots of deprecated features removed.
The code of WooCommerce integration was cleaned and restructured, if you have any custom code that relies on GTM4WP internal data structure,
please update the plugin on a test version of your website before updating your live site!
- Removed: deprecated Universal Analytics events for WooCommerce
- Removed: deprecated filter GTM4WP_WPFILTER_AFTER_DATALAYER/gtm4wp_after_datalayer
- Removed: deprecated filter GTM4WP_WPFILTER_ADDGLOBALVARS/gtm4wp_add_global_vars
- Removed: deprecated feature that puts the 'Do not track' option of the browser into the data layer. It is a deprecated browser feature therefore removed from this plugin.
- Removed: deprecated Google Optimize integration
- Removed: deprecated constants GTM4WP_OPTION_BLACKLIST_MACRO_* and GTM4WP_OPTION_BLACKLIST_
- Removed: deprecated WordPress filter GTM4WP_WPFILTER_GETTHEGTMTAG (deprecated in v1.16)
- Changed: lots of internal function names and variable names changed, although is not recommended to depend on them, if you did, check your code
- Changed: renamed WP filter gtm4wp_datalayer_on_pageload to gtm4wp_woocommerce_datalayer_on_pageload to better reflect when it is called.
- Changed: orderData data layer variable in WooCommerce integration now includes keys to better support enhanced conversions setup:
- orderData.customer.billing.first_name_hash
- orderData.customer.billing.last_name_hash
- orderData.customer.billing.phone_hash
- Deprecated: orderData.customer.billing.emailhash, please update to use orderData.customer.billing.email_hash (with an underscore)
- Added: stockstatus key into the product array of every ecommerce action. Returns the value of WP_Product->get_stock_status(). Thanks hans2103.
- Added: integration with WebToffee GDPR Cookie Consent plugin. GTM4WP can not fire a GTM event when user consent changes or when a previously stored consent has been loaded.
- Fixed: add_payment_info and add_shipping_info events were not fired during checkout submit when not fired before on the page.
- Fixed: GTM4WP will only look for the user's IP address in the REMOTE_ADDR server variable. You may enter a custom HTTP header instead in plugin settings.
v1.20 beta2
- Fixed: some i18n missing strings
- Fixed: Consent Mode v2 flags without default values
- Fixed: GTM4WP will only look for the user's IP address in the REMOTE_ADDR server variable. You may enter a custom HTTP header instead in plugin settings.
v1.20 beta1
THE BIG CLEANUP RELEASE!
Lots of deprecated features removed.
The code of WooCommerce integration was cleaned and restructured, if you have any custom code that relies on GTM4WP internal data structure,
please update the plugin on a test version of your website before updating your live site!
- Removed deprecated Universal Analytics events for WooCommerce
- Removed deprecated filter GTM4WP_WPFILTER_AFTER_DATALAYER/gtm4wp_after_datalayer
- Removed deprecated filter GTM4WP_WPFILTER_ADDGLOBALVARS/gtm4wp_add_global_vars
- Removed: deprecated feature that puts the 'Do not track' option of the browser into the data layer. It is a deprecated browser feature therefore removed from this plugin.
- Removed: deprecated Google Optimize integration
- Removed: deprecated constants GTM4WP_OPTION_BLACKLIST_MACRO_* and GTM4WP_OPTION_BLACKLIST_
- Removed: deprecated WordPress filter GTM4WP_WPFILTER_GETTHEGTMTAG (deprecated in v1.16)
- Changed: lots of internal function names and variable names changed, although is not recommended to depend on them, if you did, check your code
- Changed: renamed WP filter gtm4wp_datalayer_on_pageload to gtm4wp_woocommerce_datalayer_on_pageload to better reflect when it is called.
- Added: stockstatus key into the product array of every ecommerce action. Returns the value of WP_Product->get_stock_status(). Thanks hans2103.
- Added: integration with WebToffee GDPR Cookie Consent plugin. GTM4WP can not fire a GTM event when user consent changes or when a previously stored consent has been loaded.
- Fixed: add_payment_info and add_shipping_info events were not fired during checkout submit when not fired before on the page.
v1.19.1
- Fixed: run additional checks when determing product category to prevent PHP errors in certain cases
- Fixed: corrected Consent Mode flag names in admin page description texts
v1.19
WARNING!
Universal Analytics / GA3 ecommerce events deprecated!
Please update your GTM setup so that it does not rely on any of the following GTM4WP events and the old ecommerce data layer:
- gtm4wp.productClickEEC
- gtm4wp.addProductToCartEEC
- gtm4wp.removeFromCartEEC
- gtm4wp.checkoutOptionEEC
- gtm4wp.checkoutStepEEC
- gtm4wp.changeDetailViewEEC
- gtm4wp.orderCompletedEEC
Instead of the above events, you can use the new GA4 ecommerce events (add_to_cart, purchase, etc.)
In the Universal Analytics GTM tag now you have an option to use the GA4 ecommerce data in the data layer.
If you are on GA360 and still collecting ecommerce data, you need to update your GTM setup to use that option firing on the GA4 ecommerce events.
- Updated: WooCommerce integration now accepts the primary category selection of Yoast SEO and Rank Math SEO
- Updated: use the gtm4wp_admin_page_capability filter to modify the capability needed to use the admin page (thanks emreerkan)
- Fixed: price did not include the .00 postfix for integers in the add_to_cart event
- Added: if needed, you can turn on clearing the ecommerce object before a new GA4 event is being pushed.
- Added: support for Google Consent Mode default command for use cases where the consent management tool does not support it already
v1.18.1
- Fixed: PHP notice about Undefined variable: blocking_cookie
v1.18
- Updated WooCommerce compatibility version number
- All other changes: see release notes of v1.18 beta 1