# Data Layer

> A list of facts a page writes for tracking tools. It holds things like price and product.

**Field:** Marketing & SEO  
**Category:** MarTech, Data & AI  
**Also known as:** dataLayer, Tracking Data Layer

## Think of it like

It is like a notice board in a kitchen. The cook writes what happened, and anyone can read it.

## Definition

A data layer is a shared list of facts that a web page writes for its tracking tools to read. When something happens, like a sale, the page adds a note with the details. The tag manager reads the note and passes the facts to each tool. So the tags do not have to dig through the page to find the price. When the page design changes, the tracking keeps working.

## Example

The checkout page writes that a 42.50 euro order just happened. The tag manager sends that number to the analytics tool and to the ad pixel.

## Example code

```javascript
window.dataLayer = window.dataLayer || [];
dataLayer.push({ event: "purchase", value: 42.5, currency: "EUR" });
```

The page writes one note: a purchase worth 42.50 euros just happened.

## Why it matters

Tracking built on a data layer lives through a site redesign. Tracking that scrapes the page breaks.

## Common mistake

Letting each team name events its own way. Agree on one list of event names first.

## Three principles

- **The page writes.** The site states the facts.
- **The tags read.** Each tool takes what it needs.
- **One naming plan.** Every event has an agreed name.

## Related terms

- [Tag Management System (TMS)](https://learn.benibix.com/term/marketing/tag-management-system)
- [Conversion Tracking](https://learn.benibix.com/term/marketing/conversion-tracking)
- [Server-Side Tracking](https://learn.benibix.com/term/marketing/server-side-tracking)
- [JavaScript](https://learn.benibix.com/term/development/javascript)

![A web page on the left writes a note into a data layer box: purchase, 42.50 euros. A tag manager container in the middle reads it. Inside the container, three tags each fire on their own rule and send the facts on to analytics, an ad platform and email.](https://learn.benibix.com/diagrams/martech-tag-manager.svg)

---

Source: https://learn.benibix.com/term/marketing/data-layer
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
