If you have a custom search bar on your website, or a search bar on your blog, you can track what people search in Google Analytics.
Jump to section:
You can set up tracking for what people search with your search bar through Google Analytics. If you have not set up Google Analytics, see the Google Analytics Setup Guide.
How to set up Site Search Tracking in Google Analytics
When logged into your Google Analytics account, navigate to the Admin settings, found in the bottom left corner.
No go to the ‘View Settings’ under the ‘View’ – this is the 3rd column on the right side.
Site Search Settings
Scroll down the page and you will see a switch titled ‘site search tracking’ – set this to ‘on’ and you will see a new box appear. The ‘Query parameter’ box.
What is a Query Parameter?
A query parameter is the character that follows a URL, when someone uses a search box on a website, or a search engine. If we take Google as an example, the query parameter is the character which follows the question mark, after the main domain name.
The ‘q‘ is the query parameter, and the word after is what the user has searched. But be aware, not all sites have the same query parameter.
How do I find my Query Parameter?
The best way to find your site specific query parameter is to make a search on your website.
If we use this website as an example, when you use the search bar and hit enter, the URL link will look like this:
The query parameter for this website is ‘s‘ – that’s what needs to go in the box on Google Analytics.
What is the Site Search Categories?
You will also see a button to turn on ‘Site search categories’ – this is for specific website search bars. Some website search bars show categories in the search query string URL. This is used across large websites, so you can see what area of the website a search is from.
For example, a website with an eCommerce area, and user portal has the same search bar. When a user performs a search on the eCommerce area, the category will be added to the end of the query string URL:
This is the same for the user portal area:
If you check this button, it will ask for the ‘Category parameter’ – this can be different for any website, and this is set up in the backend by a web developer. Best to contact your developer or see details about your website theme (if using WordPress).
You can also use to strip out the category parameter, if you only want to see the search terms.
Add your Query Parameter
When you have found your query parameter, enter it in the box and then click save at the bottom. Now you will be able to see what terms people are searching on your website.
How to see what people Searched
On your Google Analytics dashboard, there is a report called Site Search Overview – find this in the left side menu. Open Behaviour > Site Search > Overview.
From here you will see how many searches were performed on your website, the search term and more metrics – like what percentage of visitors used the search bar.
From here, you can see the full list of search terms people have searched on your website. In the left menu, you can see the;
- Search Term List
- Site Search Category (if setup)
- Start Page – what page the user searched from.
Site Search Report Metrics
There are several new metrics on the site search report, which offer further insight into how people use your site search.
Sessions with Search – How many Sessions on your website had a site search.
Total Unique Searches – The total number of times someone used the search bar.
Results Page Views/Search – This is how many people viewed the search results page after a search.
Some search bars auto complete queries, or include a drop down for results, meaning that not everyone who uses the search bar, views a results page.
% Search Exits – This is the percentage of site visitors that left your website, after using the search bar.
% Search Refinements – This is the percentage of searches that where for the same keyword. For example, if someone searched for the same word twice, it would only count as 1 search on Analytics.
Time After Search – This is the average time visitors have spent on your website, after they have used the search bar.
Avg. Search Depth – This is the average number of pages visited after using the search bar.
Now you can set up tracking for your site search bar, be that a custom search or blog search.
Know someone who could benefit from this post? Share it with them ⬇