Follow the steps below to access any of the Data Layer variables this plugin can provide:
- Click on the Variables link in the left pane of Google Tag Manager:
- Scroll down to see the New button:
- Enter a descriptive name and click on the grey circle icon:
- Select Data Layer Variable from the list:
- Enter the name of the Data Layer variable you wish to access:
- I suggest to leave the Version parameter to Version 2
- 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