How to set up search for your site?

When users search your site, their queries are usually included in the URL. For example, if you use Google to search the phrase Mountain View, you see q (Google’s query parameter) followed by your query: http://www.google.com?hl=en& q = mountain+view … If your site uses categories, then the same principle applies.
For More Information Please Refer:
https://support.google.com/analytics/answer/1012264?hl=en
You May Also Like to Read:
How to set up Google Analytics site search report?