GTM4WP 2.0.0 beta 2 is available for download
The second beta of GTM4WP 2.0 is out. You can download it from GitHub.
Download from here:
https://github.com/duracelltomi/gtm4wp/releases/tag/2.0.0-beta2
Version 2.0 is a complete rewrite. The settings screen, the internal structure and large parts of the WooCommerce tracking are new, while the public integration surface stays where it was: the template functions, filters, actions, wp-config constants and the stored option key are unchanged, so existing customizations keep working.
What changed since beta 1
- Compatibility with WordPress 7.1 and WooCommerce 11.0.0 is now declared. Both were checked against the actual source of those releases and neither required a code change in the plugin.
- Related products list attribution registered on a WooCommerce filter that does not exist in any supported version, so it never ran. It now uses the hook WooCommerce really fires.
- Cart cross-sell click tracking now matches the CSS class the Cart block renders.
- The search field on the settings screen has the same height as the fields next to it on WordPress 6.7 to 7.0.
Further fixes came out of the security and test review passes that ran between the two betas. The full list of what is new in 2.0 is in the changelog:
https://github.com/duracelltomi/gtm4wp/blob/master/CHANGELOG.md
Minimum requirements are unchanged: WordPress 6.3, PHP 8.0 and WooCommerce 5.0.
How to install it
Download the file named duracelltomi-google-tag-manager-for-wordpress-2.0.0-beta2.zip from the release page. Do not use the source code archives that GitHub generates on the same page, because the compiled scripts are not stored in the repository and those archives will not work as a plugin.
In your WordPress admin, go to Plugins, Add New Plugin, Upload Plugin, and upload the file. WordPress will ask whether to replace the version you have. If you are already running beta 1, install beta 2 over it the same way.
Please test this on a staging copy of your site first. This is a pre-release and I do not recommend it for a production site yet.
The stable release stays 1.22.5
The version served by wordpress.org is still 1.22.5, so nobody receives 2.0 as an automatic update. If you want to go back after testing, install 1.22.5 again, either by uploading it or with a rollback plugin. Your settings are migrated when 2.0 activates and the old option format is kept in sync, so a downgrade keeps your configuration, but please take a backup before you start.
Feedback
If something does not work, or a data layer value is not what you expect, please open an issue so that it can be fixed before the final release:

Are you going to continue to maintain and update version 1.22.5 or are we all going to be forced eventually to switch to version 2.0 with has no support from scroll trcking?
Hi John,
Removing the feature from the plugin does not remove scroll tracking from your site. Google Tag Manager has had a native Scroll Depth trigger since 2017. You add it in your container, set the percentage or pixel thresholds you want, and fire your GA4 or Google Ads tags from it, with no plugin code involved.
The scroll tracking in 1.x is a very old script, based on Justin Cutroni’s content tracking code from 2012, and it was added at a time when Google Tag Manager could not track scrolling at all.
Two things the old script did are not covered by the Scroll Depth trigger on its own, so I would like to know whether you rely on either of them:
1. It measured the bottom of one specific content element, identified by a DOM ID you entered in the plugin settings, instead of a percentage of the whole page, so that the footer and the comments did not count. The equivalent in Google Tag Manager is an Element Visibility trigger on the last element of your article template.
2. It measured how many seconds passed before the visitor reached the bottom and labeled the visitor “scanner” or “reader” based on that. GA4 measures engagement time on its own, and a Timer trigger next to the scroll trigger covers most of what that label was used for.
Version 2.0 also adds two page variables you can enable, pageContentWordCount and pageReadingTime, so that you can normalize scroll depth against the length of the article instead of treating a 300 word page and a 3000 word page alike.
On the 1.x line: it is not abandoned. It has its own branch, and 1.22.5 was released after work on 2.0 had already started, because the fixes in it were worth giving to 1.x users right away. What the 1.x line does not receive is new features or behavior changes, since development happens on 2.0 now.
Nobody is switched over silently either. 2.0 is a beta at the moment, available on GitHub only, and wordpress.org still serves 1.22.5 as the stable version. When 2.0 becomes the stable version there, sites with automatic plugin updates enabled will receive it in the usual way, and I will announce that in advance. If you prefer to stay on 1.22.5 after that, you can turn automatic updates off for the plugin, although you would then stop receiving fixes.
Please let me know what your current scroll setup measures and which tags you fire from it. If the built-in trigger leaves a real gap, I would rather hear about it now than after 2.0 becomes the stable release.