WPML 5.0 and GTM4WP
WPML 5.0 needs no GTM4WP update, but your Google Tag Manager setup might need some adjustment.
WPML has announced version 5.0 and sent plugin developers a notice about the changes that can affect other plugins. I have checked GTM4WP against every item on that list. GTM4WP needs no update. One of the changes can still reach your Google Tag Manager container on a new site, so it is worth explaining here.
What WPML 5.0 changes
WPML 5.0 changes three things that other plugins can depend on. Language switching now nests, so a plugin that switches the language and then switches back by name leaves WPML switched. The old icl_ajx_action and icl_tm_action request entry points are removed. And a language code can now name a country as well as a language.
GTM4WP never switches the WPML language and never uses the removed entry points, so the first two items do not apply. The plugin reads the current language from WPML through the wpml_current_language filter and passes the value on into the pageLanguage data layer variable without comparing it to anything, so the third item does not break the plugin either, but it changes the value your container receives on some sites.
Language codes with a country
Until now WPML has identified a language by a short code, such as en for English or de for German. Starting with 5.0, a language with regional variants can carry the country as well: English (United States) becomes en-us, and other languages with regional variants follow the same pattern. A language without a country keeps its short code, so Arabic stays ar.
According to WPML, this applies to languages added on new sites. Existing sites keep the codes they have, so if your site already runs WPML, pageLanguage keeps reporting the same values after the update. Polylang is not affected.
What to check in Google Tag Manager
If you build a new site on WPML 5.0, check every trigger and variable in your container that compares pageLanguage to a bare language code. A condition such as “pageLanguage equals en” does not match en-us, and the tag stops firing without any error.
To match a language regardless of the country, compare only the part before the hyphen. A “starts with” condition with the value en covers both en and en-us. If you prefer to be strict, a regular expression such as ^en(-|$) matches en and every regional variant of English, and nothing else.
The same note is now part of the pageLanguage section of the documentation. If anything else changes on your site after the WPML update, please report it in the support forum on wordpress.org or on GitHub.
