Glossary

Data layer

A structured object on a page that exposes site and event data for a tag management system to read.

Also called: dataLayer

A data layer is a structured, intermediate object—commonly a JavaScript array or object named dataLayer in Google Tag Manager—that sits between a website's or app's code and its tracking tags. Instead of hardcoding vendor-specific tracking calls throughout a codebase, developers push standardized data into the data layer, and tracking tools read from it.

In practice, a page or app pushes objects like dataLayer.push({event: 'purchase', value: 99.00, currency: 'USD'}) at the moment something happens. A tag management system listens for these pushes and uses them as triggers and variables to fire the appropriate event tracking calls to analytics and advertising tools.

The data layer matters because it decouples tracking configuration from application code: marketers can add or change tags without a developer redeploying the site, and every tool draws from the same consistent values rather than scraping the page's HTML. The common pitfall is a poorly documented or inconsistent schema—different pages naming the same event differently—which silently breaks tags. Teams that rely heavily on a data layer typically maintain a written tracking plan to keep it consistent, feeding both client-side tags and server-side tagging setups.

Last reviewed September 19, 2026

In the index now

Related terms

Related tools

Related guides