Use a data layer to set Analytics variables via Tags

Using a data layer for Analytics and other Experience Cloud solutions is a best practice. In this video, learn how to pull values out of the data layer and use them in Experience Platform Tags to populate variables in Adobe Analytics.

Data layers

A data layer is a framework of JavaScript objects that developers add to digital web pages. Analytics solutions ultimately use the data layer to populate reports. Tag management systems, including Experience Platform Tags) are the intermediaries that read the data layer, map the values to variables, and send that data to digital experience solutions.

Review additional information about data layers in the Experience Cloud documentation and the blog Data Layers: From Buzzword to Best Practice.

Data Layers, Experience Platform Tags, and Adobe Analytics

  1. Define or identify a data layer standard to use on your site.

    1. Position the data layer as high as possible in the head section of the page and before the call to Experience Platform Tags. This ensures that the values are accessed immediately by Tags and by Adobe solutions that need to be high on the page, like Adobe Target.
  2. Populate the data in the data layer.

  3. In Experience Platform Tags, create “data elements” that map the data points in the data layer. These data elements are used throughout Experience Platform Tags in rules and extensions.

  4. In either the Analytics extension’s global variables section or in a Tags rule, assign the values in data elements to props, eVars, pageName, and other Analytics variables.

  5. Trigger a beacon that sends the data into Analytics.

The following video walks you through the process.

NOTE

The specific data layer used in this video may not be considered “best practice” for your organization. The concept of using a data layer for surfacing important data to your digital marketing solutions is best practice.

On this page