If you have a search feature on your website, you should be tracking what people are looking for. The Google Analytics Site Search function allows you to see which search words are used by users, the pages where they start looking, and where they travel from your search results page.
You will need to customize Site Search in Google Analytics before you can start using the results. Read our guide to learn how to set up Google Analytics site search tracking for your website, either through site search query parameters, or through filters.
In a nutshell, site search tracking is an option within Google Analytics that allows you to track the keywords that users enter into your website’s internal search engine.
You have the ability to view what types of queries are being searched, which allows you to identify new content opportunities, or ensure that your web pages align with the user’s intent when first entering one of your site’s landing pages.
There are several steps involved with setting up site search tracking in google Analytics, which we’ll cover below.
The first step is to identify the query parameters used for your website’s internal search engine.
If you’re using another type of CMS or website platform, it’s easy to find the right query parameter. Enter a search within your site’s search feature - you should see a URL like this:
The query parameter will often be a single letter in between the ? and = signs in the URL.
Next, go into your Google Analytics Admin page and press "View Settings".
In the "View Settings" area, click on "Site Search Settings" and Enable "Search Site Tracking".
Enter the Question parameter you had found in Step 1. If you need to, you can also enter more parameters (make sure to separate them by commas).
It’s also recommended that you check “strip query parameters out of URL” - otherwise, you may see rows in your content reports for each distinct search term used, rather than the search term, like /search?q=house .
Page Search helps you to set up categories as well. You can do this if users are able to filter search results within various areas of your website.
To set categories, you would need to know the parameter used to optimize the search results.
You should use a similar technique to the one that we've already discussed to locate the question parameter used for the search word.
If your search feature does not have sections or categories, you should leave this choice off.
Looking to learn more about search engine optimization? Read our SEO beginner’s guide for everything you need to know about SEO and how to drive business results through search engines like Google and Bing.
If you don’t have query parameters for your internal search feature, you’ll can use filters instead, although this requires a more complex approach.
As an example, if you have a URL such as ‘example.com/index/search/contact’, set up your filter in the following way:
For a filter such as If your URL looks like ‘example.com/search.php/keyword/contact/id946’ you’ll need to set up your filter in this way:
Lastly, if your URL looks like ‘example.com/searchterm/contact’, here’s how you’ll set up your filter:
Now that you have site search set up, you can glean a lot of valuable data from the content reports. Here are a few ways in which you can improve your website’s content:
Under “ %Search Exists” stats in Google Analytics, you can see if people are clicking on results for a given search term, or if they’re leaving your website (Behavior > Site Search > Search Terms).
This can provide some optimization opportunities, such as ensuring that relevant articles are being presented for that search term, or changing page thumbnails to entice users to click on them.
Under the segment pulldown report, you can gauge visitor behavior in a number of ways, including desktop vs. mobile searches, if returning users are searching on the your website, or what visitors in geo-specific locations are searching.
Wondering how users are converting on your website? You can set up goal tracking in Google Analytics to determine if users who use your site search feature are converting more compared to non-search users.
Under Behavior > Site Search > Search Terms, you can see a list of “Search Refinements” that will show how much users are refining their search if they aren’t immediately getting the results they want.
You can also set up your site search to display new content, depending on the keywords they are searching for, which can give them a needed visibility boost.
The biggest benefit of the site search tracking in Google Analytics is the ability to view all of the search terms users are searching within your internal search engine.
You can see which types of queries people are searching for the most to optimize existing content to better capture that user intent. You can also brand new content, if users are searching for specific topics that your site doesn’t cover or provide good results for.
Now that you’ve set up Google Analytics search tracking, be sure to check out some of our other resources to level up your Google Analytics knowledge: