Data Layers Explained

Shivam Bhonsle Updated by Shivam Bhonsle

A data layer is a consistent layer of structured information behind the scenes of your website. It acts as a common dictionary of information that can be used to drive user experience and support digital marketing and analytics applications.

This might include information like:

  • Products in carts
  • Order IDs
  • Customer IDs (anonymised)
  • Page details and categories
  • Google Analytics events (via GTM dataLayer)
  • AB testing campaign names or attributes

Tracking your Data Layer

By default, Insightech tracks your data layer object out of the box so that you can use this information for our free-text search, segments and filters.

  • If your data layer has the default name of "dataLayer" then Insightech automatically captures everything that is pushed into this object.
  • If you are using a custom data layer name, you will need to setup your Insightech profile to identify your custom data layer name.

Data Layer Example

This is an example of what is shown in your data layer.

In this example, we can see multiple attributes that we can search for:

  • event_category
  • event_action
  • event_label (order ID)
  • ecommerce - currency code
  • ecommerce - purchase details
  • ecommerce - products in order

Notice that data points either, don't have any layers under them (e.g., event_action)or are multiple layers deep (e.g., ecommerce purchase actionField ID).

How to Search for Data Layer Events on Insightech

Insightech will use the data layer to search through events on your website.

Follow these Steps

  1. Select Data Layer Event from the events drop down list
  2. Select JSON Path
  3. Enter the path of the attribute
  4. Select your condition (is/ contains /etc.)
  5. Input the value you want to search for

Example: Data Layer Event Search on Insightech

In the example below, we might want to search for the order number, stored under ecommerce purchase actionField ID.

The JSON path of this element is, and we would set it to look for the value 23226401.

How did we do?

Set Up your Custom Data Layer