What is the data layer?
This is a json structured data, with obvious hierarchical relationships, such as Page contains pageinfo and product; all data is a key-value structure, such as pageID is Nikon Camera.
The benefits of the data layer?
Facilitate maintenance of transmitted data.
Data is fixed to ensure accurate data.
The page is assembled with data and does not affect page loading. The required fields can be configured in the data element.
Weakness in the data layer?
First, you cannot actively push data，data layer is a static object on the page.
Second, the data is on the page and it is easy for competitors to find out what you are tracking.
Third, when there is a large amount of data, it means that corresponding data elements are required, and the maintenance of data elements will increase.
How to use the data layer?
Let’s take a look at how to use the data layer. Using data is mainly divided into three steps. The first step is to assemble the data on the page. The second step is to pass the data to Launch. The third step is the reference.
1.Create a data layer
Put this data layer as high as possible in the head of the page, before the call to Adobe Launch, so that the values can be used immediately by Launch, and by Adobe solutions that need to be high on the page, like Adobe Target
2. Create a data element in Launch to get data layer variables.
In Launch, create “data elements” that reference the data points in the data layer, and which can be used throughout Launch in rules, extensions, etc.
Suppose you get a Page Name, Eg：
3. Reference data layer
Use the data elements in either the Analytics extension global variables or in a rule, assigning the values into props, eVars, pageName, or other Analytics variables
Application cases of the data layer:
There are many applications for the data layer. The following can be achieved through the data layer:
Let’s look at some specific examples:
Site Content Effectiveness
This solution allows the business unit to evaluate the effectiveness of the site’s pages, including their influence on conversion, landing page bounce rate and exit rate as well as gives the marketers the ability to drill down on each level of your site hierarchy. To do that requires that every page of the site be tagged with an effective page name and variables to represent each level of the content hierarchy.
An example of how the dataLayer for this solution must be set is as below ,This object describes the page information:
This solution allows you to track the types of tools users use as well as the impact it has on any downstream activities and conversion. Example data object for calculator page:
Internal Site Search
This solution is intended to track internal search terms, that is, searches being performed by users on your site to help business understand top search keywords, conversion rate for top keywords, as well as keywords that not returning any results to help you further optimize your internal search engine. This object describes the search term and search results