
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 has two new options for working with patterns. You can use a Regex Table variable. You can also use the sandboxed JavaScript APIs createRegex and testRegex. These let you match values against regular expressions in your tags and triggers.
What this means for ecommerce accounts
For ecommerce advertisers, this mainly helps with tracking setups. A Regex Table variable lets you map many page or product values to new values using pattern matching, without writing a long chain of separate conditions. The createRegex and testRegex APIs are for custom templates and sandboxed JavaScript, so they matter if you already write your own GTM code.
This update does not say how these options affect Shopping, Performance Max or Search campaigns directly. They change how data is prepared in GTM, which can then feed your conversion tracking. If you do not use GTM or do not work with custom variables, these options are unlikely to change anything for you.
What to do now
- Check whether your GTM setup has long lists of conditions that a Regex Table variable could replace.
- Test any new regex variable in GTM Preview mode before you publish the container.
- Review whether the values you send for conversions or product data still match what Google Ads expects.
- If you use custom templates, check whether createRegex or testRegex can simplify them.
FAQ
What is a Regex Table variable in Google Tag Manager?
A Regex Table variable is a new option in Google Tag Manager. It lets you use regular expressions to match input values and return set output values. This can replace many separate conditions with one variable.
What do the createRegex and testRegex APIs do?
They are sandboxed JavaScript APIs for Google Tag Manager. createRegex builds a regular expression, and testRegex checks whether a value matches it. They are used in custom templates and sandboxed JavaScript code.
Does this change affect my Google Ads campaigns directly?
This update does not say that it changes campaigns directly. It adds options inside Google Tag Manager. Any effect on your Google Ads results would come through the data your tags send, so check your conversion tracking after you make changes.
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 scanNew to a term? See the Google Ads glossary.


