Variables in GTM

A variable in Google Tag Manager is an object that is given a name and can take on different values (like a key-value pair). The name of the variable is constant, and its value changes depending on what actions are taking place on the site. The obsolete name for a variable in the previous version of Google Tag Manager was macro.

Google Tag Manager

Google Tag Manager (GTM) is a free tag management system that allows you to easily add and update measurement and marketing tags on your website or mobile app without having to modify the code.  

DataLayer

A data layer is an object (array of objects) or JavaScript variable that stores and transmits information from your website to Google Tag Manager. This data can then be passed to other services, such as Google Analytics, Facebook, Criteo OneTag, and more.