Data layer is an important component for any Web Analytics implementation. Without it, web developers will have a hard time organizing the data before passing them to the relevant channels (tag management system, database, etc). Implementing a data layer is simple and effortless, and you might already have something similar in place but just don’t know it yet. In this article, we will explain in-depth what exactly is a data layer, how we can use it and what do we need to look out for. If you’re new to analytics, we have some articles to get you started: Setting Up Google Analytics Setting Up Adobe Analytics Without further ado, let’s jump right in!
Nothing too fancy huh?
Why Do We Need a Data Layer?Without a Data Layer, what happens is that, we define data as and when we need to pass them over to another application. Functionality-wise, there is nothing wrong with this approach. But as the need to pass data around increases, it can be a very messy affair. Before long, you will be having trouble keeping track of the data used, and worse, standardizing the data. Having a proper data structure allows us to have a clear overview on all the data used and also ease data management. As Data Layer is generic, it can be used by any tool that benefits from having a structured data storage on your website! Take for example, today, we are using Google Analytics. Two months from now, due to the need for more complex tagging, we decided to switch to Adobe Analytics. Does that mean we have to re-work our Data Layer? NO! Remember, Data Layer is generic and tool-agnostic! Therefore, it is important for us to put in more effort in planning out the Data Layer.
- digitalData.form (For forms such as application forms, contact-us forms, etc)
- digitalData.tool (For tools such as branch locator, financial service calculator, etc)
- digitalData.onclick (For all sorts of clicks such as button clicks, link clicks, etc)
- digitalData.video (As the name suggests, for video attributes)
What Else Should We Look Out For?By now, you should be all ready to create your own Data Layer! But before you leave, here are some pointers we have that will make your life easier:
Always make sure that the data stored is granularWhat do we mean by that? Take for example, we want to capture data that is made up of several individual pieces of information. In this case, an address. In an address, we may have the following:
- Block number
- Street name
- Zip code