Made by Rune Andersen @ Copenhagen, Denmark
dataLayer logo

Debug dataLayer in Chrome DevTools

To debug dataLayer in Chrome DevTools, install the free Event Watcher extension and open its panel: every push to dataLayer is captured the moment it fires, broken out into its parsed query and body parameters, plus the cookies it set and sent, and cross-referenced against the visitor's consent state. Event Watcher has listed dataLayer under Data Layers since v1.0.0 and treats it as consent-exempt infrastructure, so the consent check applies to the tools it loads rather than to dataLayer itself.

Google Tag Manager data layer - array-based event data structure for passing information to GTM.

Last updated:

Category
Data Layers
Detected via
JavaScript interception: Event Watcher hooks the data layer object and captures every push
Consent category
Exempt: infrastructure that is not itself consent-gated
Supported since
Event Watcher v1.0.0 (2026-02-20)
Show the dataLayer objects Event Watcher matches
  • window.dataLayer.push({...})

What dataLayer traffic looks like

The GTM data layer never touches the network: its "traffic" is JavaScript push calls on a page-level array.

Data layer object
window.dataLayer.push({ event: 'add_to_cart', ecommerce: {...} }). The event key is what GTM triggers match against; the rest becomes data layer variables
Transport
None: page-level JavaScript only. Event Watcher detects pushes by intercepting the push calls themselves, not by URL patterns
Built-in events
GTM lifecycle (gtm.js, gtm.dom, gtm.load) and interaction events (gtm.click, gtm.linkClick, gtm.scrollDepth), plus gtm.uniqueEventId stamps on processed pushes
Consent signals
Google Consent Mode rides this channel: gtag('consent', ...) calls land as arguments-style entries in the same array

A typical push, as Event Watcher captures it:

{
  "event": "add_to_cart",
  "ecommerce": {
    "currency": "DKK",
    "value": 499,
    "items": [{ "item_id": "SKU-123", "item_name": "Trail Runner", "quantity": 1 }]
  }
}

Debugging dataLayer with Event Watcher

  • Every push appears in the live stream as its own event, with source attribution: a stack-trace classification of website code, tag manager, or third-party script.
  • Pushes that fired before DevTools was opened are captured too and flagged as historical, so the pre-load burst is not lost.
  • The Grouped view's Datalayer pivot collects pushes separately from the network noise.
  • Any push can be copied out as JSON for a ticket or a spec comparison.

dataLayer and consent

Consent-exempt infrastructure

The data layer is consent infrastructure, not a consent-gated tracker, so it carries no consent category. It is the channel consent state travels through: CMPs push decisions into it, and Consent Mode defaults and updates flow to GTM.

Event Watcher's CMP detection reads exactly this surface, and the ordering of those pushes relative to tag firing is where most consent bugs live. See GA4 fires before consent for the canonical case.

Common debugging scenarios

  • "Who pushed this event?" The push's source attribution answers it (website code, tag manager, or third-party script) before you blame the frontend team. See the guide.
  • A push seems to vanish. It probably fired before you opened DevTools. The stream keeps it among the historical pushes, no re-triggering needed.
  • Ecommerce data bleeding between events. GTM's data layer merges state, so a stale ecommerce object persists unless cleared with ecommerce: null. Comparing consecutive push payloads in the stream shows it.
  • Trigger never fires. The stream shows the exact event string pushed. Diff it against the trigger's expected name; case and underscores matter.
  • SPA route changes. The stream shows whether a virtual pageview push actually fires on navigation, and in the right order relative to dependent tags.

See dataLayer traffic on your own site

Free, no account, runs entirely inside Chrome DevTools.

Add to ChromeFree on the Chrome Web Store

Related guides

More data layers platforms