Site search usage on your WordPress site
Use the following data layer variables to access data about the term the user was searching for on your site. 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 Enhanced Measurement settings under Site Search.
siteSearchTerm
You may want to use this data layer variable to track certain micro conversions or remarketing conditions based on the search term entered by the user.
siteSearchFrom
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.
siteSearchResults
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.