What is the Data Layer?

0
Most of the sites I go to if I use dataLayer on the console, it brings me some information, others do not ... For example, here in SOpt does not. I also saw that Google Tag Manager uses dataLayer to do many things.

What exactly is this then and how to "create one" for some website?

    
asked by anonymous 11.10.2018 / 21:13

1 answer

1

What is

The Data Layer is a set of information from the website or user, being responsible for centralizing this data and allowing its use by various Digital Marketing tools.

Basic implementation of the Data Layer

In practice, the Data Layer can be a Objeto or a Lista JavaScript , according to the default of a specific Tag Manager or as best suits each case. Let's take the default Google Tag Manager for this example:

Since Camada de Dados will be used by Tag Manager , it is preferable that your statement is before the Tag Manager call, otherwise it will not have access to the data declared in the Layer and will not work as expected. >

An example implementation would look like this:

window.dataLayer = [
{
  "page": 
          {
            "title": "E-commerce Brasil",
            "category": "Home"
          }
}
];

General

In general it is widely used for reading and implementing data, for example a particular shopping site uses this method to extract data from what the user visits, based on that the site directs to "Google ADS" the type of products want ads to direct the user

Example:

-I visited the pichau site I saw several amd products:
-Ads on other sites started to be targeted:

This is done through DataLayer, there are also other uses but I took a sharper example for better visualization of the example.

I recommend reading: link

    
11.10.2018 / 23:22