How to access a Data Layer variable

Follow the steps below to access any of the Data Layer variables this plugin can provide:

  1. Click on the Variables link in the left pane of Google Tag Manager:
    Access Data Layer variable 1
  2. Scroll down to see the New button:
    Access Data Layer variable 2
  3. Enter a descriptive name and click on the grey circle icon:
    Access Data Layer variable 3
  4. Select Data Layer Variable from the list:
    create data layer variables 1
  5. Enter the name of the Data Layer variable you wish to access:
    create data layer variables 2
  6. I suggest to leave the Version parameter to Version 2
  7. You may wish to enter a Default value which will be used by Google Tag Manager when there is no value found from my plugin (for example the search term is only included when the user is on the search result page) but this is usually not necessary