GTM4WP 2.1 release candidate 2 is ready for testing
GTM4WP 2.1 release candidate 2 for Google Tag Manager on WordPress is ready for testing, with WooCommerce price, tax and performance fixes.
The second release candidate of GTM4WP 2.1 is available for testing. It adds no features: every change since release candidate 1 is a fix or a corrected setting description. Like the earlier test builds, it is published only on GitHub; wordpress.org keeps offering 2.0.6 as the stable version until the final release. The beta 1, beta 2 and release candidate 1 announcements describe what is new in 2.1 as a whole. This post covers what changed since release candidate 1.
Check your GTM setup
The WooCommerce add_to_cart and remove_from_cart events now always report value and the item price as numbers, rounded to cents, and 0 when a price is missing. This holds on every product, list, cart and block path. If a trigger or variable in your container compares value against a text value, update it when you install this build.
Changes since release candidate 1
- WooCommerce stores with “Exclude tax” on that show prices with tax: product, list,
add_to_cartand cart prices now use the same basis as the purchase, so they no longer include tax. - WooCommerce items that the
gtm4wp_eec_cart_itemorgtm4wp_eec_order_itemfilter excludes are left out of every event. A password-protected product no longer reportsview_itembefore the password is entered. - A WooCommerce order is flagged as tracked only when its purchase event is really printed, so a site filter that breaks the event no longer suppresses the purchase for good.
- REST API requests no longer build the plugin’s settings schema. On WooCommerce sites with many pages and a persistent object cache, this had slowed down every REST request.
- Google service accounts: a stored key can now be replaced. Define
GTM4WP_ENCRYPTION_KEYin wp-config.php to keep the keys readable when a security plugin rotates the WordPress security keys. - Google Data Manager: the value of a refund follows the tax and shipping settings that were in force at the time of the purchase. With “Only output the container on production environments” on, a staging copy of the site no longer sends refunds.
- Easy Digital Downloads: reliable purchase tracking waits until a pending order is paid.
The release notes list every change.
Release plan
The final release on wordpress.org is planned for November 2. The date can still move if testing finds something that needs a fix.
How to test
Please test the release candidate on a staging site, not on a live store. Download duracelltomi-google-tag-manager-2.1.0-rc2.zip from the release page and upload it under Plugins > Add New > Upload Plugin. WordPress offers to replace the installed version. The source code archives that GitHub generates are not installable.
Please report anything you find on GitHub with “2.1 RC” in the title. A problem reported now can still be fixed before 2.1 is released on wordpress.org.
