Enabling site search in google analytics will give you strong keywords for on site optimization. In google analytics you can view the search terms that your audience use to find your content.
How to track site search in Google Analytics?
You might have noticed and if not do it now. Open our analytics-faq page in a new tab and in the search bar type google analytics and click on the first page. Now check the URL of the page. You might see this post at first.
You can see the search query is attached to the end of actual url separated by question mark(?).
Google analytics tracks the url of the page checks for any parameters attached to the actual string and it by default differentiate between if it is a search term or not. This way you can get the search terms being entered on your site search bar.
But first, you would have to enable site search in google analytics.
How to enable site search in google analytics?
In your analytics account navigate to the specific view in which you want to enable site search
Next, click view settings
Under site search settings, switch on the site search tracking
In the query parameter box you can write searchQuery to identify the query url in your reports
Now your setup should look something like this
Finally, save the changes by clicking the save button.
Once you enabled site search it may take upto 24 hours to generate search reports in your GA account.
How to see site search terms in google analytics?
To see the search reports in your analytics account you should navigate to Behavior >> Site Search >> Overview
See the original question: https://www.en.advertisercommunity.com/t5/Analytics-Academy/Site-Search-in-Google-Analytics/m-p/599464#M94