Banner blindness: why users ignore your CTA
86% of users unconsciously ignore banner ads. Discover what banner blindness is and how to overcome it so your CTAs actually convert.

The dataLayer is a JavaScript object that acts as a communication layer between your website and Google Tag Manager (GTM). It is essentially a structured information container that your site "publishes" when something relevant occurs — a purchase, an add to cart, a form submission — and that GTM listens to in order to fire the corresponding tags: GA4, Meta pixel, TikTok pixel, Criteo, or any other tracking tool.
Without a correctly implemented dataLayer, GTM can only capture basic interactions: clicks on elements, page views. It cannot access the value of an order, the product ID added to the cart, the email of the user who completed a form, or the segment the visitor belongs to. In other words, without a dataLayer, your conversion analysis is superficial and your remarketing campaigns have fragmented data.
The exact nomenclature in JavaScript code is always dataLayer (no spaces, in camelCase), and it must be initialized as an empty array before loading the GTM container:
window.dataLayer = window.dataLayer || [];
This line ensures that if the dataLayer already exists (for example, if GTM loads multiple times), it is not overwritten. It is the standard pattern that must be present in the <head> of your page, before the GTM snippet.
The communication flow always follows the same pattern:
The method for publishing data to the dataLayer is dataLayer.push():
dataLayer.push({
event: 'add_to_cart',
ecommerce: {
currency: 'USD',
value: 59.90,
items: [{
item_id: 'SKU-12345',
item_name: 'Whey Protein Chocolate 1kg',
price: 59.90,
quantity: 1,
item_category: 'Supplements'
}]
}
});
This push causes GTM to receive the add_to_cart event with all its associated data, which it can then map to GA4, the Meta pixel, or any other tool that needs that signal.
Google's eCommerce specification for GA4 defines a set of standard events that form the foundation of any implementation. Implementing them correctly is the prerequisite for having reliable conversion data.
| Event | When it fires | Minimum required data |
|---|---|---|
view_item_list | When showing a product list | item_id, item_name, price, index |
view_item | When opening a product page | item_id, item_name, price, currency |
add_to_cart | When adding to cart | item_id, quantity, price, currency, value |
begin_checkout | When starting the payment process | items[], value, currency |
add_payment_info | When selecting payment method | payment_type, value |
purchase | When completing a purchase | transaction_id, value, tax, shipping, items[] |
remove_from_cart | When removing from cart | item_id, quantity, value |
The purchase event is the most critical. It must include a unique transaction_id to prevent page reloads of the order confirmation page from duplicating conversions recorded in GA4. This is one of the most common and most costly mistakes in eCommerce analytics.
The most direct tool is GTM's Preview mode. When activated, a panel opens at the bottom of the browser that shows in real time all events published to the dataLayer as you browse the site. You can see the exact content of each push and verify the data is correct.
For a quick inspection without activating GTM Preview:
// In the browser console, view the current dataLayer contents
console.log(window.dataLayer);
// Monitor all pushes in real time
var originalPush = dataLayer.push;
dataLayer.push = function() {
console.log('dataLayer push:', arguments[0]);
return originalPush.apply(this, arguments);
};
The Chrome extension "DataLayer Inspector+" by Datalayer.dev shows all pushes to the dataLayer in a readable format and allows searching for specific events. It is especially useful on sites with many events to locate problems without reviewing the source code.
1. Initializing the dataLayer after the GTM snippet. GTM must find the dataLayer already initialized when it loads. If the window.dataLayer = [] declaration comes after the GTM snippet, data losses occur on the first event.
2. Purchase events without a unique transaction_id. Without a unique transaction identifier, every reload of the purchase confirmation page duplicates the conversion in GA4 and on ad platforms. ROAS and revenue data become systematically inflated.
3. Passing value as a string instead of a number. value: "59.90" is not equivalent to value: 59.90. GTM and GA4 expect numbers for numeric metrics. Passing a string can result in incorrect sums or the data not being processed.
4. Not clearing the dataLayer between pages in SPAs. In Single Page Applications (React, Vue, Angular), the dataLayer persists between navigations. If not cleared correctly, data from one product can remain in the dataLayer when the user navigates to another product, contaminating subsequent events.
5. Manual implementation without validation. Changes to the site's code (CMS updates, theme change, new checkout) can break the dataLayer without anyone noticing. It is essential to have alerts in GA4 or automated monitoring.
The relationship between the dataLayer and CRO is direct: without reliable data, optimization decisions are intuition disguised as analysis. An A/B test measuring duplicated conversions due to a missing transaction_id can lead to incorrect conclusions about which variant performs better. A funnel analysis that loses the add_to_cart event cannot identify where friction is occurring.
At Boost, tracking audits are always the first step of any CRO project. If the data is wrong, the entire optimization strategy is built on sand. To go deeper into the tag management layer, see our guide on Google Tag Manager, and on server-side tracking if you want to understand how to take tracking to the next level with more precise measurement and no ad blocker interference.
Detect tracking errors in your eCommerce with a free audit at Scan&Boost.
Want to improve your conversion rate? Discover our CRO service
Adrià Vidal is the founder of Boost. 1,000+ optimization actions executed, +€7.8M in additional revenue generated.
86% of users unconsciously ignore banner ads. Discover what banner blindness is and how to overcome it so your CTAs actually convert.
Dynamic content adapts your website to each user in real time. Learn the strategies, tools, and real cases that demonstrate its conversion impact.
CLV measures the total value a customer generates throughout their relationship with your business. Learn how to calculate it, interpret it, and use it as...