How To Set Up Google Analytics Site Search Tracking For Your Website

Brandon LazovicJanuary 5, 2021

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. 

What Is Site Search Tracking? 

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. 

Setting Up Google Analytics Site Search Tracking

There are several steps involved with setting up site search tracking in google Analytics, which we’ll cover below. 

Identify Site Search Query Parameters In Google Analytics

The first step is to identify the query parameters used for your website’s internal search engine. 

  • For WordPress, it’s usually “s“.
  • For Squarespace or Wix, it’s “q“.
  • For PhotoShelter, it’s “I_DSC“.

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. 

Enable Site Search Tracking In Your Google Analytics Dashboard

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). 

Check “Strip Query Parameters”

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 . 

Enable Site Search Categories

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.

Using A Filter Instead Of Query Parameters

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:

  • Field A -> Extract A: Request URI: ‘^/index/search/(.*)’
  • Output To -> Constructor: Search Term: ‘$A1’
  • Select ‘Field A required’ and ‘Override Output Field’

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: 

  • Field A -> Extract A: Request URI: ‘^/search.php/keyword/(.*)/id’
  • Output To -> Constructor: Search Term: ‘$A1’
  • Select ‘Field A required’ and ‘Override Output Field’

Lastly, if your URL looks like ‘example.com/searchterm/contact’, here’s how you’ll set up your filter: 

  • Field A -> Extract A: Request URI: ‘^/searchterm/(.*)’
  • Output To -> Constructor: Search Term: ‘$A1’
  • Select ‘Field A required’ and ‘Override Output Field’

Using Your Site Search Tracking To Improve Your Website Content

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: 

Improve Underperforming Internal Search Results

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. 

Comparing Visitor Groups Through Segment Pulldown

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. 

Gauging Conversion Rates Via Search Option

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. 

Refining Internal Search Results

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. 

Feature New Content

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. 

Analyze Traffic Search Terms Within Google Analytics Dashboard

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: 

Categories:
Digital Marketing
Social Media
Digital PR
Photography
SEO
Analytics
Tool Reviews
Local SEO                                                          
Contact: 
brandon.lazovic@gmail.com                           

Sitemap           Privacy            Editorial Guidelines
Copyright © 2021 Brandon Lazovic LLC. All rights reserved.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram