Site search tracking

Tracking Site Search in Google Analytics – A Step By Step Guide

Do you have an internal search box on your website, and you’d like to know what keywords your website’s visitors are typing into that “site search” box? Well, you can do that, and it’s usually very simple to set up using Google Analytics.

site search

Why Do I Want To Track Site Search Using Google Analytics?

The Google Analytics “Site Search” reports can give you lots of very useful information, for example:

  • What products/services users are searching for (you may need additional calls-to-action for popular products or services)
  • Whether or not the user found what they were looking for (through engagement metrics like time on site, etc.)
  • Searches for products or services that you don’t have content for (but should)
  • What questions users have (which you could answer on a page or blog post)

You can use the information that you gather to help you design appropriate calls-to-action, or develop new content. Now you’re using your own users to inform you about what topics you write about on your site (helpful, right?) and you’re more likely to come up in the search engine results for those keywords, and so on.

How Do I Set Up Site Search Tracking in Google Analytics?

1. Log in to Google Analytics, go to your profile, and then click on the Admin button in the upper-right corner (in the orange menu bar)

Google Analytics Admin Button

On the next screen, click on the profile that you want to set up Site Search on.

Click on the “Profile Settings” tab.

Google Analytics Profile Settings Tab


4. Scroll to the bottom where it says “Site Search Settings”. Here, you want to select the radio button next to “Do track Site Search”.

Do Track Site Search

5. Next, you need to enter the parameter in your website’s URL which contains the keyword after a user performs a search.

This is where most people get confused, and why so many sites end up without Site Search tracking. So I’ll give you a few extra tips, as Google’s help makes this more complicated than it is.

Go to your website, enter in a keyword (for example: blue widgets) into your site’s search box, and hit “Return” or click “Submit”, or “Go”, or whatever you need to click to make the search happen.

Now look at the resulting URL. Depending on how your website has been developed, this can take a number of different forms, but will usually look something like these examples:

Now what you are looking for is the “parameter”, or name, in the URL that is assigned to the search term (or keyword). Usually it’s something like “SearchTerm”, “q” (for “query”), “s” (for “search”), “keyword”, etc., and you’ll find it right before the keyword and an equal sign (=). You don’t need to include the equal sign, because that’s not part of the parameter name (in fact, if you do, site search won’t work). I’ve highlighted the parameters in the examples above in red. Just note the parameter name (make sure you have all the correct capitalization and spacing) and copy or type that into the “Parameter” box in Analytics.

Note: if the URL that appears when you use your site search feature does not include the keyword in the URL, your site may be using POST-based search. Google offers some helpful tips on setting up site search for POST-based search engines, if that’s the case.

If you want Google to strip the search query parameter out of the URL when reporting pageviews of the search page, you can check off the “Strip query parameters out of URL” box. Normally, I don’t do this, and unless you know what you’re doing and have a specific reason for using this feature, you can just ignore this.

You can also check off the box for “Site search categories” if your site search uses a category selector (drop down menu, etc.). If you check off this box, Google adds another field to enter the Category parameter, which you find in the same way and is usually something like “cat” or “qc” (for query category), etc. Again, if you don’t think you have categories (most basic site search features don’t), you can just ignore this.

Here’s what the final settings look like, for my example where the URL specifies “SearchTerm=blue+widgets” as the parameter and keyword (you would put whatever your parameter is – it might just be a single letter like q or s).

Google Analytics Site Search Settings

Couldn’t be much simpler, could it?

6. Now just click “Apply”, and you’re done with the setup.

7. When you want to view the search queries that people have used in the Site Search feature of your website, log in to Analytics, and go to the “Content | Site Search | Search Terms” report. This will show you a list of the search terms that users entered into the Site Search box, along with stats like the number of searches for that keyword, and the time spent on the site after the search.

Best of luck, and enjoy Site Search tracking in Google Analytics!

0 replies

Leave a Comment!

Leave a Reply

Your email address will not be published. Required fields are marked *