The dataLayer works as an intermediate layer between your Web site and analytics tools. It is an array of objects containing relevant data such as pages visited, products viewed, transactions and user actions. Each entry usually contains an event property that indicates what happened, such as "page_view," "click," or "purchase.
Google Tag Manager Preview Mode is by far the most effective way to read dataLayer events. Activate this mode by going to "Preview" in GTM and entering your website URL. A new tab will open with your website, plus a debug window at the bottom. In this debug window, you will see all dataLayer pushes appear in real time. Each time an event is triggered, such as a page visit or click, it immediately appears in the timeline. You can click on each event to see the full dataLayer content, including all variables and their values. The big advantage of GTM Preview Mode is that you can see exactly which tags are fired on each event. You can verify that your tracking is working correctly and that all necessary data is being sent. The window also shows which triggers are active and which tags were successfully executed.
In addition to GTM Preview Mode, you can use the browser console. Open the console in your browser (via element inspect) and type dataLayer
to see the full content. For a structured view, use console.table(dataLayer)
. Specific events can be filtered with dataLayer.filter(item => item.event === 'purchase')
. Browser extensions such as "dataLayer Checker" also provide a user-friendly interface for viewing dataLayer content without technical knowledge.
Common problems include missing events, duplicate records or incorrect data formats. GTM Preview Mode helps identify these problems quickly. Verify that the dataLayer is initialized correctly and that events are named consistently. Pay particular attention to the timing of events. Some events may be triggered too early or too late, which you can easily see in the GTM Preview timeline. This helps optimize your tracking implementation and ensures reliable data collection.
In GTM Preview Mode, you can see which tags are fired for each event. Click on an event in the timeline and view the 'Tags Fired' tab. Here you can see all the tags that were successfully executed, including GA4 tags. A green check mark means the tag was successfully fired. For additional verification, you can also look at Google Analytics Realtime reports. Go to GA4, click on 'Realtime' and perform actions on your website. Events will appear in the real-time view within seconds. Note that test events can sometimes have a few minutes delay.
Start with these essential events: 'page_view' for page visits, 'purchase' for transactions, 'add_to_cart' for shopping cart additions, 'form_submit' for form submissions and 'click' for key button clicks. For e-commerce sites, 'view_item,' 'begin_checkout' and 'add_payment_info' are crucial. B2B sites should focus on 'generate_lead,' 'download' and 'video_play' events. Check technical events such as 'scroll' and 'file_download' as well. Start with a maximum of 5 to 7 events to maintain overview.
For new deployments, check daily for the first week to detect problems quickly. For existing tracking, weekly checks suffice. Always perform checks after website updates, new functionality or marketing campaigns. Schedule monthly thorough checks where you go through all major events. Large e-commerce sites or intensive marketing activities may require daily monitoring. Set alerts for critical events such as transactions that suddenly stop. Use GTM Preview Mode with every new tag implementation. Automate where possible with tools that detect anomalies. Document your checks so team members know when the last check was performed.
GTM Preview Mode does not have a built-in filter option, but you can use the search function in your browser. Press Ctrl+F and search by event name such as "purchase" or "click. For advanced filtering, you can use the browser console. Type in dataLayer.filter(item => item.event === 'purchase')
to see only purchases. For user-specific filtering, use dataLayer.filter(item => item.user_id === '12345')
. Another method is to use GTM variables to tag events with additional information. Create custom dimensions in GA4 to facilitate later filtering by specific user groups or behaviors.