Data about site search

How to enable this feature?

This feature is disabled by default which means that you will need to enable it:

  1. Go to Settings / Google Tag Manager on your WordPress admin area
  2. Click on the Basic data tab
  3. Click on the Search subtab
  4. Put a check mark into the box shown on that page

Enabling this will allow you to access the following Data Layer Variables on all pages:


Includes the term the user was searching for on the search results page. Usually it is not needed to use this to track internal site search in Google Analytics as it can be tracked easily by adding the s parameter in Analytics.

You may want to use this Data Layer variable to track certain micro conversions or remarketing conditions.


Includes the source page of the search. For example if you include a search box in one of your sidebar widgets, this Data Layer variable will include the URL of the page where the user entered the search term.


This variable will include the number of results on the search results page. You may want to use this to track empty result pages along with search terms so that you can see what information users are looking for that can not be found on your site.