Calculates on this device. File exports run online.
Analytics Data Layer Viewer
Paste your data layer — the JSON that window.dataLayer holds, JSON Lines or page code with dataLayer.push() calls — and see each push with its event, every value with its path and type, and the data model that Google Tag Manager builds from the pushes, after any push you choose. Or compare two data layers to see which events and keys one has and the other lacks, and which values changed type.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use it
- In your browser’s console type copy(JSON.stringify(dataLayer)) and paste the result here.
- Press Show the data layer, then read the pushes, the values and the data model; type a push number to see the model at that moment.
- Choose Compare two data layers and paste a second one, such as the same page after a release.
How the data model is built
- Google Tag Manager merges each pushed object into one data model (its data-layer-helper library): objects key by key and arrays item by item. Values that are not objects or arrays replace the old value.
- Because arrays merge item by item, a push with fewer items leaves old items behind; this is why Google asks for { ecommerce: null } before each ecommerce push.
- Pushes that are not objects, such as command arrays ['set', ...], do not change the model here.