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.
https://marketlytics.com/?s=google+analytics
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 property in which you want to enable site search
Next, click Admin tab
Go to Data Streams >> Enhanced measurement
- In the Enhanced Measurement settings, ensure that the Site Search toggle is turned on.
- This setting tracks internal search queries automatically.
- Click Show advanced settings to configure how GA4 captures search terms.
- In the Search Term Query Parameter field, enter the query parameter(s) used by your site. For example, if your site uses
q
as the query parameter, enterq
here. - You can enter multiple query parameters separated by commas (e.g.,
q,s,search
).
- In the Search Term Query Parameter field, enter the query parameter(s) used by your site. For example, if your site uses
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?
In GA4, go to the Reports section and check the Events report.
- Look for the view_search_results event, which is automatically triggered when users perform a search on your website.
See the original question:Â https://support.google.com/analytics/answer/9216061?sjid=3426671283201662980-EU