Blog Post - Pete Crawley , Jul 13 2017

Why your site needs a data layer to help derive insight

Why your site needs a data layer to help derive insight

If you’re looking to derive insight from a mass of data, the one thing you’re likely to need to create to enable communication across different platforms and environments is a data layer.

So what is a data layer?

Short technical answer, it’s a JavaScript Object containing key value pairs. It’s not visible to the average web user but easily accessible by a tag management tool enabling analytics and marketing tags to be augmented with additional data.

For a shorter answer, it’s a bit of code on all pages of a site with extra information that can be used in analytics and marketing tags. Shortest answer, it’s something every site needs!

Why do you need a data layer?

Sticking with the shortest possible answer, it unifies your reporting capabilities across all tools, therefore removing the duplication of work and increasing accuracy and consistency of reporting across tools.

For example, on your site you have an analytics tool, a paid marketing tool and an A/B testing tool. All these tools for various reasons want to be able to quantify that this page is a content page. Before, you had a data layer that defined the page category as a ‘content page’. One tool might rely on the structure of the page URL, another tool by the class given to the body tag, and the last by a painfully manual process of listing all the pages and checking them off against a list.

It doesn’t stop at this one piece of data either. The possibilities are near endless: product SKU’s, categories, prices, actions such as logging in, adding an item to your bag, purchases - all of these data points are harmonised across all tools.

We are still seeing accuracy gains by moving to this methodology. Recently the Salmon Digital Intelligence team delivered a client a 14% increase in analytics reporting accuracy, as well as identical reporting on a recent A/B test between the Google Analytics and Optimizely data sets.

Given the near endless possibilities of data, you could include is as a vital part to start off the process, by answering three key questions:

  1. What business questions are you trying to answer?
  2. What data do you need to do this?
  3. Does this web data line up with business reporting data?

Without understanding these three key points you could easily have an implementation project that spirals significantly over budget and way past deadlines, and by the time it is ready, everyone has lost interest (not that we at Salmon would let that happen!). Before starting any project like this, the Digital Intelligence team carry out a thorough review to ensure we are delivering something that is useable and to the point.

Avinash Kaushik echoes this exact point: why cloud the situation with unnecessary dimensions and metrics; always ask yourself why. Keep in mind once you have a data layer in place, there is nothing to stop you expanding and adding more data to it later. Or transforming the data you have in a Tag Manager to a different format to meet all needs.

Some of you may now be thinking ‘I have multiple sites on different domains and different platforms - this is no use to me’. First of all thanks for getting this far; secondly this is still applicable. By implementing an identical data layer structure across multiple sites, you would be able to standardise the reporting process giving your analytics team consistent data across all sites. And if you haven’t already, add a roll up reporting to further reduce reporting efforts.

Are all data layers the same?

Obviously, there will be some cross-over in the date required by businesses so the kind of data will be similar. But there may also be a few subtle formatting differences due to the tag management vendor that the data layer has been built to support. There is the independent w3c standard which works for many vendors, but some have added in an extra layer of functionality to improve the tools such as Google, Qubit, and Tealium. Ideally you would want to match up the data layer implementation with the tag management tool of choice. Both of these have been chosen to complement to the analytics, marketing and A/B testing tools already in your technology stack.

Conclusion

Having worked across multiple tools, sites and clients over many years, the Salmon Digital Intelligence team can reliably validate that everything is easier when all the data is coming from the same place. There is improved accuracy, reduced hours to make changes and reduced code on the site. As a result, adding a data layer makes everything simpler.