Update time: July 5, 2024
What is the DataLayer?
A DataLayer is a framework of JavaScript objects on your site that contain the variable values used in your Analytics implementation. It allows greater control and easier maintenance when assigning values to Analytics variables.
DataLayer Type
There are two types of Data Layer in Adobe Launch:
- Customer Experience Digital Data Layer(CEDDL)
- Event-Driven Data Layer(EDDL)
Customer Experience Digital Data Layer
Customer Experience Digital Data Layer is abbreviated as CEDDL, usually directly called Data Layer, this is the static Data Layer, on the page, which is actually a JavaScript variable, its name is digitalData, such as:
This data is static. In JavaScript, it needs to be combined with Custom Event and DCR to send data.
Event-Driven Data Layer
Event-Driven Data Layer is abbreviated as EDDL, similar to GTM’s Data Layer, this is a dynamic Data Layer that actively sends data out.
Adobe Client Data Layer (ACDL)
ACDL is EDDL provided by Adobe.
By default the ACDL script creates a new data layer with the variable name adobeDataLayer,
Send data with adobeDataLayer.push, for example:
adobeDataLayer.push({ "component": { "training-data": { "title": "Learn More", "link": "learn-more.html" } } });
The following methods are available on the data layer object:
push()
: Adds items to the data layer.getState()
: Returns the merged state of all pushed data.addEventListener()
: Sets up a function that will be called whenever the specified event is triggered.removeEventListener()
: Removes an event listener previously registered withaddEventListener()
.
Data Layer Manager
Data Layer Manager is an EDDL provided by Search Discovery.
window.appEventData = window.appEventData || []; window.appEventData.push({ "event": "Page Loaded", "page": { "siteLanguage": "en-us", "siteCountry": "US", "pageType": "product detail", "pageName": "pdp - crossfit zoom", "pageCategory": "womens > shoes > athletic" } });