Home / dataLayer inspector

A dataLayer inspector that keeps the order

You can type dataLayer in the console. What comes back is an array with no timing, no consequences and nothing from before the last navigation.

The console is the default answer and it is not wrong, exactly. Typing dataLayer gives you the pushes as an array, which is enough to confirm a key exists. It is the questions after that one where it runs out.

Why the console is not enough

What the panel shows

Every push, in the order it happened, held across navigations, with the tracking requests each one produced nested underneath it. The event name, the full object, and — for the pushes that caused something — the platforms that reacted.

The panel listing dataLayer pushes in order, each with the tracking requests it produced underneath
The console gives you the array. This gives you the order, and what each push actually caused.

A push with nothing under it is a trigger that did not match. Requests with no push above them are a tag firing on something else entirely. Both readings are impossible from an array, and both are the answer most of the time.

From a push to GTM variables

Once you have found the push you need, the rest of the job is transcription: writing each dot-path into GTM as a Data Layer Variable, then a Custom Event trigger, then wiring a tag to them. Picking the event in the panel and ticking the values you want produces all three, already shaped for import.

What comes out is a GTM container export, not a session file — it goes into GTM, and there is no loading it back into the extension. What that file has to contain covers the two fields that make GTM refuse the whole import, and picking the event covers the step before it.

A caught dataLayer event with its values listed and checkboxes for the ones to keep
Pick the push, tick the values that matter, and the variables and trigger come out shaped for GTM.

Where the console still wins

Reading the merged model right now. google_tag_manager['GTM-XXXXXX'].dataLayer.get('ecommerce') returns the value GTM would hand a variable at this instant, which is exact, immediate and something a recorded history cannot give you. A panel that captures pushes is a record of what happened; the console is a probe into what is true. Use the probe when you are asking about now.

Questions

How do I view the dataLayer on a page?

Typing dataLayer in the browser console returns the array of pushes. For the order, the timing and what each push caused, a panel that records them as they happen shows what the array cannot.

Why is the console dataLayer different from what GTM reads?

The array is the log of pushes; GTM keeps a separate merged state built from them. When a key is written twice, the array holds both and the model holds the last one — which is the value a variable resolves to.

Does it work on single-page apps?

Yes, and this is where it matters most. Pushes are held across route changes, so the ordering between a virtual pageview and the events around it stays readable instead of scrolling away.

Can I turn what I find into GTM variables?

Yes. Picking an event and ticking the values you want produces the Data Layer Variables, the Custom Event trigger and a tag wired to them, as a GTM container export ready to import.

Does it work on sites I do not own?

Yes. Nothing is required from the site — no container access, no code change, no debug session.

Guides

The longer form, on the parts that catch people out.

The other two: GTM debugger, GA4 debugger

Try it on your own site

Tag Master is free, needs no account, and collects no data.

Add to Chrome — Free

Rated 5.0 by 17 users on the Chrome Web Store.