What is Data Layer?
A JavaScript array that temporarily holds structured data on your website so Google Tag Manager can accurately read it and send it to analytics tools.
The Data Layer is the foundational bridge between your website's backend (the CMS, the shopping cart) and your marketing tags.
Instead of forcing GTM to "scrape" the page for a product price computationally (which breaks if the design changes), your developers explicitly push the price into the Data Layer when a product is viewed.
How it looks:
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': 'USD',
'value': 29.99,
'items': [{
'item_id': 'SKU_12345',
'item_name': 'Nice Tool Widget'
}]
}
});
If your GTM variables are failing or e-commerce data is missing, the very first thing an audit checks is the integrity and formatting of your Data Layer pushes.
Does your GA4 have Data Layer issues?
Stop guessing. Run our automated engine to analyze your exact setup in 60 seconds and find out.