All updates

Google Tag Manager update

Share on LinkedIn

You can now use Regex Table variable and regex Sandboxed JS APIs: createRegex and testRegex for Google Tag Manager.

What changed

Google Tag Manager now supports a Regex Table variable. It also adds two sandboxed JavaScript APIs for regular expressions: createRegex and testRegex. These let you use regex matching in tags, variables and triggers in a new way.

What this means for ecommerce accounts

For ecommerce advertisers, this matters most when your tracking depends on matching page URLs, product IDs or event values with patterns. A Regex Table variable lets you map many input values to output values in one place, which can replace long lists of separate conditions. The createRegex and testRegex APIs are for custom templates, so they mainly help people who build or maintain their own tag templates.

If your Shopping and Performance Max conversion data comes from GTM, cleaner variables mean cleaner purchase and add-to-cart events. Those events feed the conversion signals that Smart Bidding uses, so this can indirectly affect campaign results. If you only use standard GTM setups with built-in tags, this update probably does not change anything for you. It also does not change how Google Ads itself works.

What to do now

  • Check whether any of your current tags or triggers use long lists of conditions that could become one Regex Table variable.
  • Test any new regex variable in GTM Preview mode before you publish it.
  • Compare purchase and add-to-cart counts in GA4 and Google Ads after a change to confirm the data still matches.
  • Keep a note of which variables you changed, so you can roll back if numbers shift.

FAQ

What is a Regex Table variable in Google Tag Manager?

A Regex Table variable maps input values to output values using regular expression patterns. You set up a table of patterns and the value each one should return. It lets you handle many matching cases in one variable instead of building many separate conditions. It is useful for cleaning URLs, product IDs or event values before they go to your tags.

Do I need to change my Google Ads campaigns because of this GTM update?

This update does not describe any change to Google Ads campaigns. The update is about Google Tag Manager variables and sandboxed JavaScript APIs. Your campaigns only change indirectly if your tracking data changes. Check your conversion numbers after any GTM edit to make sure they still match what you expect.

What are createRegex and testRegex?

They are sandboxed JavaScript APIs in Google Tag Manager that let custom templates work with regular expressions. createRegex builds a regex object from a pattern. testRegex checks whether a value matches that pattern. They are mainly for people who write custom tag templates rather than standard GTM setups.

Want this checked in your own account? I manage Google Ads for ecommerce brands that spend €10K or more a month. In a free 30-minute quick scan we look at your account together.

Book a free quick scan

New to a term? See the Google Ads glossary.

The week in Google Ads, in one email.

Every Google Ads change that matters, every week. 140K subscribers.

See the newsletter

Seen something new in your account?

Send me the screenshot