How to Set up Internal Site Search in Google Analytics
Now that you have a better idea of what site search is and why you should use it and optimise it for your business website, let’s go over Google Analytics site search tracking. With Google Analytics Site Search, you can see the search keywords customers use, which pages they start their search on, and the pages they visit based on the search results page. This information provides insight into your website content, navigation setup, and your search campaigns.
Before you can use the reports, you must first configure site search in Google Analytics. Let’s go over how you can configure your website to get these reports:
Search Query and Category Parameters
Finding the query parameter that powers your site’s search feature is the simplest method to configure the site search reports.
Begin by conducting a search on your website and inspecting the URL for the search results page. If you search the word “contact” and your search function accepts query parameters, you’ll get a URL that looks something like one of these:
- examplewebsite.com/search?q=contact
- examplewebsite.com/index.php?id=search&term=contact
- examplewebsite.com/search.asp?search_term=contact&id=ac9024
Suppose the URL doesn’t have a question mark, an ampersand, or the word that you searched (“contact” in this case). Then, you will want to use a different approach rather than the query and category parameter approach. However, if it does look like this, continue through to the following steps:
Step 1: Identify the query parameter.
To identify the query parameter, look for the term you just searched. Before that, there should be an equal sign. Before the equal sign, you will see a character or word. Then, in front of that, you will see a question mark or ampersand. The query parameter is whatever is between the question mark or ampersand and the equals sign.
- In example 1, “q” is the query parameter.
- In example 2, “term” is the query parameter.
- In example 3, “search_term” is the query parameter.
Step 2: Configure Google Analytics.
Navigate to the ‘Admin’ area of your Google Analytics account. Then, click the ‘View Settings’ option.
Step 3: Change site search settings.
Set ‘Site Search Tracking’ to ‘On’ and enter your query parameter in the ‘Site Search Settings.’ Google Analytics allows you to specify up to five query parameters separated by commas.
If you select ‘Strip query parameters from URL,’ your search will be hidden from your reports. However, you’ll see rows in your content reports for each individual search phrase used, such as ‘/search?q=contact’ if you select this option.
Make sure to save your settings.
Step 4: Test it out.
To make sure your site search analytics are working:
- Perform a few searches on your site, then wait at least 10 minutes.
- Set your date range to ‘today’ in the Google Analytics view (where you changed your settings).
- Navigate to Behaviour, Site Search, then Search Terms Report.
If you see data there, then congratulations, that means your site search is working. If your site uses categories, then navigate to the ‘Site Search Category’ link to view that data.
Final Note about categories using this method:
Site Search also enables categorizing. If users can filter search results or search inside certain website areas, you should use this option. First, you’ll need to identify the search parameter used to refine the results. Then, using the same method as before, you can determine the query parameter used for the search term. This option can be left off if your search engine doesn’t have categories or if you don’t need it.