What is
The Data Layer is a set of information of the website or the user, being responsible for the centralization of this data and allowing its use by various Digital Marketing tools.
Basic Data Layer Implementation
In practice, the Data Layer can be a Objeto
or a Lista JavaScript
, according to the standard of a Tag Manager
or as best suited to each case. We will adopt the Google Tag Manager standard for this example:
As the Camada de Dados
will be used by Tag Manager
, it is preferable that your statement be before the call of Tag Manager
, otherwise, it will not have access to the data declared in the Layer and will not work as expected.
An example of implementation would be as follows:
window.dataLayer = [
{
"page":
{
"title": "E-commerce Brasil",
"category": "Home"
}
}
];
General
In general it is widely used for reading and implementing data, for example a certain shopping site uses this method to extract data from what the user visits, based on this the site directs to "Google ADS" the type of products wants ads to target the user
Example:
-I visited the site of pichau saw several amd products:
-Ads on other sites have started to be targeted:
This is done through Datalayer, there are also other uses but I took a sharper example for better viewing the example.
I recommend reading: https://blog.dp6.com.br/o-que-%C3%A9-a-data-layer-or-data-layer-80f37fa3429c