To a computer programmer, a variable is a symbol in code that can be used to represent a value that will change. A Tag Manager variable performs that same function. Tag Manager variables are used in both triggers and tags:
- Variables in triggers are used to define filters that specify when a particular tag should fire.
Example: Fire a pageview trigger when the url variable is “example.com/index.html”.
- Variables in tags are used to capture dynamic values.
Example: Capture and apply the transaction value and products purchased to a conversion tag.