Skip to content
Tag Manager Training
GTM & GA4 glossary

GTM glossary

Lookup table variable

A GTM variable that turns one value into another using a simple table, like "if the hostname is staging.example.com, use the test GA4 ID".

Also known as: Lookup table, RegEx table

On this page
  1. In plain English
  2. Example
  3. Official documentation
  4. Related terms

In plain English

You choose an input variable, then list input values and the output each one should return. You can also set a default value for anything not in the table.

Lookup tables save you building lots of near-identical tags. If you need pattern matching rather than exact matches, the RegEx Table variable works the same way but accepts regular expressions.

Example

Input variable: {{Page Hostname}}.

  • www.example.com returns G-LIVE1234
  • staging.example.com returns G-TEST5678

Your Google tag uses the lookup table instead of a fixed ID, so test traffic never ends up in the live GA4 property.

Official documentation

Last reviewed

Next step

Want your team to know this without looking it up?

Hands-on Google Tag Manager and GA4 training for agencies and marketing teams in Brisbane, the Gold Coast and the Sunshine Coast.