How to use a data layer on your web pages

If you want to make the most of your tag management implementation, you’re going to a need to apply a data layer to your websites’ page(s). Tuomo is going to tell us why.

“A data layer is just a place on your site that holds information so that the tags you have implemented for tracking purposes can refer back to it when required.

Having a data layer on your pages keeps all of the required information for your tag management system in one, easy to find place. So it not only assists with your data collation/management and analytics, but makes it easier for the user to locate information manually should they need to.

As an example, if you were running an ecommerce website, you could add a data layer that captures information such as whether visitors have logged in or not. You can track events such as Add to cart and the cart contents, and as part of your order confirmation page all of the order details (product, SKU, category, price, quantity, tax, shipping, etc) can all be logged and combined to provide detailed data for your analytics.

If you use a tag manager, such as Google Tag Manager or Enlighten, a data layer (JavaScript object) will be added to the pages by default. But as part of your analytics process you should spend some time looking at what information you would want to push to the data layer to give you real business insights from your analytics.”

Related Blog & News