DataLayers Explained


A data layer is a consistent layer of structured information behind-the-scenes of your website.


Data layers act as a common dictionary of information to help drive your users experiences, and for your supporting digital marketing and analytics applications (like Insightech). 

This might include information like:

  • Products in cart
  • Order IDs
  • Customer IDs (anonymised)
  • Page details / categories
  • Google Analytics events (via GTM dataLayer)
  • AB testing campaign names or attributes
  • Other 3rd party tools and details


Insightech Automatically Tracks Your dataLayer Object


By default Insightech tracks your dataLayer object out-of-the-box, so that you can use this information in searches, filters, and audience segments


  • If your data layer object has the default name of "dataLayer" then Insightech will automatically identify and capture everything that gets pushed into this object.
  • If you are using a custom data layer name (e.g. 'myDataLayerName'), you will need to setup your Insightech profile to identify your custom data layer name. 

Click here to setup your custom data layer tracking


Here Is An Example Data Layer


Here is an example of what might exist 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



You will also notice that data points are either:

  • Don't have any layers under them (e.g. event_action)
  • Are multiple levels deep (e.g. ecommerce --> purchase --> actionField --> id).


We will talk about each of these examples below when we explain how to search for your dataLayer events in Insightech.



How to Search for Datalayer Events in Insightech


When putting in your filter or segment conditions from Insightech's dashboard, we will look through events that occur on the website, and select the Data Layer Event.


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. Enter the value you want to search for



AN EXAMPLE

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 ecommerce.purchase.actionField.id, and we would set it to look for the value 23226401





For more help on how to use your data layer in Insightech, simply email us at support@insightech.com.