
You can use the WordPress default search parameter to configure site search in your Google Analytics profiles.
If you enter a search term into the default search widget on a WordPress site, you’ll see that the URL of the search results page contains “s” as the parameter name for the search term entered.
Site search tracking in Google Analytics is very straightforward and can yield valuable insights about user intent. To track the usage of site search, you would need only to enter “s” as the Query Parameter value within the Site Search Settings for your profile/view.
You can configure site search tracking for non-Wordpress websites in the same way; you would just need to identify the site search parameter in the URL of your search results page and specify accordingly in your profile/view settings.