The goal is simple - you want to offer your customers the best possible experience and sell products or services efficiently. Attractive advertising campaigns and attractive prices certainly help, but what really counts in the digital world is customised information. You show the right customers the information that is relevant to them, thereby increasing your sales.

One of the most important prerequisites for this is the correct collection of customer information in such a way that you can draw the right conclusions from it. Tag management systems (TMS) such as those from Tealium or Google can be used to record various interactions on a website or app. The Google Tag Manager or Tealium iQ forwards the information to the analytics system (e.g. Google Analytics) so that it can then be displayed and analysed in a meaningful way.

The interaction of data layer and tag management system

A data layer is an object that contains specially defined information (e.g. certain page or event types) that is available on the website. This information is stored in a defined variable and forwarded to the TMS. The data layer must be active before the TMS so that the information is ready for retrieval by the Tag Manager.

The data layer is particularly important with regard to user-defined tracking. After all, we don't just want to analyse visitor behaviour, we want to know exactly why customers bought a product or where they abandoned the sales process.

These are the advantages of a data layer:

  • Better tracking results
  • Individual targeting and personalisation of web content
  • Data is recorded in a more structured and clearer way
  • Control via the application instead of in the Tag Manager
  • Inclusion of data from the backend

The disadvantage? A data layer means an initial extra effort and close collaboration with the development team is important to avoid misunderstandings. Data layers are usually installed by the developer who set up the website. But the effort is worth it.

What does that mean technically?

Data layers serve as an interface, similar to a contract between the application and the Tag Manager. The tracking configuration takes place in the application and not in the Tag Manager. This allows the events to be controlled directly by the application, which means, for example, that only a specific button is triggered for a form submit, even though it is installed on several websites with the same HTML ID. This means that incorrect data and corresponding analyses can be avoided.

normally, only the data from the frontend can be used when configuring with the Tag Manager. The built-in data layer, however, makes it possible to also use data from the backend. This simplifies, for example, secure internal and external user data filtering based on IP addresses. If this configuration is implemented via the TMS, some workarounds are required here. The use of a data layer is particularly advantageous for e-commerce applications, as a lot of product information can be pulled from the backend without affecting performance.

Another advantage is the in-built unit tests that sound the alarm if events no longer function correctly due to changes to the website. This increases the certainty that the correct data is being collected and improves tracking results. They also provide a universal data structure and can work with a wide variety of applications.

The advantages of a data layer outweigh the disadvantages

Although the development effort is slightly greater and implementation therefore takes a little longer, data layers offer significant added value for data analyses. For e-commerce applications in particular, it is crucial to be able to precisely analyse the paths taken by a customer. You learn more from customer behaviour, improve the quality of your analyses and consequently increase sales success.