Automated data layer testing

The data layer is generally regarded as the best practice for structuring how data is transferred from your website to your tag manager, and ultimately your tags.

Adding a data layer to your analytics implementation introduces a new component that can be tested, enabling you to ensure your data collection systems are running reliably, and collecting accurate data.

The problem with the data layer

The data layer introduces a more structured way of passing data from your application to your analytics and marketing platforms.  For those people concerned with data quality, the data layer provides another test point to validate the integrity and quality of the data being collected.  The downside is the extra effort required to test. The best way to address this problem is via automated testing.  Automated testing allows you to quality assure your data with minimal effort freeing you up to focus on data analysis.

Automated data layer testing

Automated data testing is regarded as the best practice approach to achieve good data quality and governance. DataTrue’s new Data Layer Validation feature enables you to test the data passed via your data layer as well as your tags. The following screenshots demonstrate how this feature alerts you to data layer issues.

Figure 1 shows an overview of a DataTrue user journey test. It summarizes the state of the data layer at different points across the user journey. In this example:

  1. Shows two successful data layer validations.
  2. Shows one successful and one failed data layer validation.

You can then drill down into the details of each validation to inspect them more closely.  The screenshot below shows the data layer validation configuration along with the data collected from the most recent test run.


The following features are provided to help you validate the data in your data layer:

  1. The Data Source is used to collect the data from the data layer.  Typically a data layer is implemented as a JavaScript variable, however, DataTrue has the ability to collect data from other elements of the web page including the DOM (document object model), cookies and the URL of the web page.
  2. The data collected from the data source is displayed in the Results panel.
  3. The Validation Settings are used to validate the data collected from the data layer.
  4. If the data layer value is a JavaScript object, then the properties of that object can be individually validated using Property Validations.

DataTrue’s data layer validation feature brings speed, accuracy, and reliability to data layer testing, and excels in regression testing and continuous data quality monitoring. To try this new feature out, login to your DataTrue account and go to the help center and check out our support articles on how to setup data layer validations.
If you don’t have a DataTrue account yet – please signup for a free trial and we can help you get started today.

Related Blogs

British Airways Airplane
UPDATED: Protect your e-commerce site from Magecart Attacks: learn from the British Airways and NewEgg attacks
It’s all over the news these days - since last September, when the British Airways cyber theft first made the news, this week the fines were announced: a record $328...
Bad Data Mistakes post image
Ten Most Common Bad Data Mistakes
Hi, in this blog post we are going to talk about some of the most common mistakes that can lead to bad data or a poor analysis of that data. We...
New Feature: Email Campaign Analytics Testing
Web Analysts! Are you frustrated by seeing your company's email campaign analytics data fall into your direct traffic source. Often this is because link tagging was missing or the landing...