@virginie
Google Tag Manager (GTM) uses a data layer to extract tracking data from a website. The data layer is a JavaScript object that contains information about the user, their behavior, and the context of their visit to the website. When the data layer is implemented on a website, it can be used to trigger tags, which are snippets of code that perform specific actions, such as tracking user behavior.
To extract tracking data from the data layer, GTM uses built-in variables and custom variables. Built-in variables are pre-defined variables that are automatically populated by GTM with data from the data layer. Custom variables, on the other hand, are variables that you define in GTM and populate with data from the data layer.
Here's a step-by-step process for how GTM extracts tracking data from the data layer:
@virginie
The specific steps GTM follows to extract tracking data from the data layer are as follows:
By utilizing the data layer and GTM's capabilities, tracking data can be efficiently extracted and sent to various analytics platforms without the need to directly modify the website's code.