Back to FAQs
Data Basics

How do I see the data layer in the console?

The data layer is a JavaScript array (often called dataLayer) that holds information your website passes to analytics and advertising tools . Viewing it through the browser’s built‑in developer tools lets you verify that events and variables are being pushed correctly. Here’s how to inspect the data layer in Chrome, Firefox or Edge:

  1. Open your browser’s developer tools – Right‑click anywhere on your webpage and select “Inspect” (or press Ctrl+Shift+I on Windows/Linux, Cmd+Option+I on macOS) to open DevTools .
  2. Switch to the Console tab – At the top of DevTools, click the Console tab to open the JavaScript console .
  3. Type the data layer object name – Enter dataLayer (or the custom object name used on your site, such as digitalData or utag_data) and press Enter . The console displays the current state of the data layer array; you can click the small arrows to expand each object and see the values of variables like event names, product IDs or transaction totals .
  4. Interact with the data layer (optional) – If you need to test pushing custom variables, you can do so in the console. For instance, dataLayer.push({'userType':'returningCustomer'}) adds a userType variable, and typing dataLayer.userType will show its value . This is useful for verifying that your marketing tags and triggers respond to the data correctly.

Tips for smoother debugging:

  • Refresh after actions – The console shows the data layer at the moment you run the command. If you navigate to a new page or click a button, re‑type dataLayer to see the latest pushes.
  • Use Chrome extensions – For real‑time monitoring, tools like Data Layer Checker or Taglab’s Analytics Debugger display updates without manually re‑typing commands .
  • Validate naming conventions – While dataLayer is the default name for Google Tag Manager, some sites use custom names. If nothing appears in the console, check your tag manager configuration for the correct object name .

Following these steps ensures you can easily inspect your data layer, confirm that events fire correctly and troubleshoot issues before deploying tags to production.

Do you have any questions?

Your questions are important to us. If there's anything on your mind that hasn't been addressed, reach out to us.
Let's talk
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.