Data Layer
01 Definition
Data Layer meaning: A structured JavaScript object that holds data for tags and triggers to read.
A data layer is a JavaScript object, often named dataLayer, that stores information about the page, user, or events in a consistent structure. Tag management tools like Google Tag Manager read from it to build variables and fire tags. A well planned data layer keeps tracking reliable as a site changes.
Also called
Why it matters
How Data Layer fits the work
The data layer separates data from tracking logic, so developers and marketers can rely on stable, named values instead of scraping fragile page elements for information.
In context
On the checkout page, the site pushes order total and currency into the data layer so the analytics tag can send accurate purchase values.
Practical note
Push values into the data layer before the relevant tag fires, or the tag reads empty data. Agree on naming and structure early, since renaming keys later breaks existing tags.