The EM dataLayer is a data structure that has all the relevant data from the page that can be processed and passed from airTRFX to other applications such as Google Analytics, Google Ads, Adobe Analytics, etc.

The EM dataLayer can be used to leverage some analytics and marketing efforts such as:

  • Custom Dimension in GA

  • Event tracking

  • Trigger rules in GTM

  • Dynamic Remarketing

The efforts mentioned above need dynamic variables that can be extracted from the EM.dataLayer.

All the available parameters of the EM dataLayer can be found in the following documentation:

How to find the EM.dataLayer in airTRFX

The EM.dataLayer can be found on any airTRFX page by simply typing ‘EM.dataLayer’ on the page:

The values of the variables in the EM.dataLayer will be different depending on the airTRFX page.

The variables are populated dynamically so the data is relevant to the current page.

Calling the EM.dataLayer from GTM

To collect the variables form the EM dataLayer in GTM there are some steps that need to be followed:

1. Create a ‘Custom JavaScript’ Variable

The naming convention of the variables in GTM can be defined by the Analytics Manager but we recommend the following naming convention:

EM dataLayer – {{section}} – {{variable}}

E.g. EM dataLayer – page – typeName

The intention of this naming convention is to have order in GTM and avoid confusion when using the variables across tags.

  • Select ‘Custom JavaScript’ as variable type


The variable will look like this:

The empty space will be used to insert a JavaScript function that will call the variable from the EM.dataLayer.

2. Insert JavaScript Function

Insert the following function (in this example we will target the pageType variable):

1function(){return EM.dataLayer[0].page.typeName;}

The CJS variable should look like this:

3. Preview / Debug

Use GTM’s Preview mode to debug the variable data collection.

  • This example provides the value for the airTRFX’s homepage

4. Use the same method to target other variables