Data layer for Adobe Analytics
A data layer is a structured JavaScript object that a website populates with page, user, and interaction context so that a tag manager can read clean, stable values instead of scraping them from the page's markup. In Adobe implementations it is the contract between the site's engineers and the measurement system.
Why it exists
Without a data layer, tag rules read the DOM: CSS selectors, element text, URL fragments. Every redesign then breaks measurement invisibly. With a data layer, the site publishes facts ("this is a product page, product ID X, user is logged in") and measurement consumes them. The site can change its face without changing its facts.
Patterns
Two dominate. The W3C-style static object (digitalData), a nested object populated on page load - simple, but weak for single-page applications. The event-driven data layer (EDDL), where the site pushes events onto an array and the tag manager processes them as they occur - the pattern Adobe's own Web SDK and ACDL (Adobe Client Data Layer) use, and the right default for modern sites.
Design rules that hold up
Name things for the business, not the DOM. Publish state changes as events rather than mutating objects silently. Version the schema and document it where engineers will find it. And validate the data layer itself in QA - a tag can only be as truthful as the object it reads.
Frequently asked questions
Is a data layer required for Adobe Analytics?
No - Adobe Analytics can be implemented by scraping the DOM, and many old implementations were. It is required in practice for stability: DOM-based implementations decay with every site release, which is why every serious implementation guide starts with the data layer.