User-defined variables

Create custom user-defined variables in Google Tag Manager to suit specific requirements that might not already be covered by built-in variables.

To create a new user-defined variable:

  1. In the left navigation, click Variables.
  2. In the User-Defined Variables section, click New.
  3. Click Variable Configuration and select the desired variable type. See the list of variable types for web pages or mobile apps for details.
  4. Complete the options for the selected variable type.
  5. Name the variable. Use a naming scheme that is descriptive of the variable's function, e.g. "Data Layer Variable - Product Name."
  6. Click Save.