How to Implement Site Search – Google Analytics
Implementing site search in Google Analytics can be very effective. You can better analyze the data & take actions to optimize or improve the conversions.
How to implement site search with query parameters?
Most of the sites prefers to have basic site search structure & it is fairly easy to implement site search in Google Analytics.
The URL structure would be something like:
In the above case, the query parameter is “q”. Now, let’s implement site search.
Login to Google Analytics, Click on Admin — >> View Settings:
Put Site search ON & add the query parameter:
In couple of hours, you’ll start seeing the site search as:
Now, not all the sites implement basic query parameters, for example. URLs like:
We can still implement the site search by extracting query parameters from the URL. In the above URL, the query parameters are “orig0” & “dest0”.
As soon as you implement the search query parameter from the URL:
You’ll start seeing the search queries:
How to implement site search from advanced filters?
If you are unable to figure out the search query parameters from the URL, there is still a way to implement site search through Google Analytics Advanced filters. For example, URLs like:
Go to filters:
Select Advanced Filters:
Add the regular search expression:
- Look for URLs (request URI) structured as defined in the RegEx [Field A->Extract A]
- Extract the first part of that URL [$A1]
- Place this as your search term [Output to ->Constructor]
Go to Behaviour –> Site Search –> Search Terms report, you should have a list of terms.