From the course: Learning Google Tag Manager

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Understanding basic variables in GTM

Understanding basic variables in GTM - Google Tag Manager Tutorial

From the course: Learning Google Tag Manager

Understanding basic variables in GTM

So far, we've seen how to deploy the built-in template-based tags. And for some of you, that'll be enough to get you up and running with Google Analytics, Google Ads, and so on. But the real power of Tag Manager comes when you leverage the ability it has as a central management system for tags well beyond just pasting static tags to pages. One of the keys is that ability to configure something once and then leverage it across multiple tags. Variables are just one way that we can do this. So just like a programmer can set a single global variable and then call it over and over from several functions, we can set a variable in Google Tag Manager and then use it whenever we need to. Variables are just a key value pair, which means that we can give it a key or a name, and then we set a value. You've likely encountered this data many times without realizing it. For example, if I go to a form like this and I fill it out, it's going to ask for my name. So I put in first name, last name, and…

Contents