Skip to content
Tag Manager Training
GTM & GA4 glossary

GTM glossary

Data layer variable

A GTM variable that reads a specific value from the data layer, such as a form name, order total or user type.

Also known as: DLV, Data Layer Variable

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

In plain English

Pushing information to the data layer is only half the job. A data layer variable is how GTM picks a value out so you can use it in tags and triggers.

Create one by choosing the Data Layer Variable type and entering the key name exactly as it appears in the data layer. Names are case-sensitive. For nested values use dots, for example ecommerce.value.

If the value shows as undefined in Preview mode, the key name usually doesn't match, or the value was pushed after the tag fired.

Example

The data layer contains form_name: 'contact'. A data layer variable with the name form_name returns contact, which you can send to GA4 as an event parameter.

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.