[Editor’s note: This post was originally published in December 2013 and has been updated to reflect the interface of Google Analytics in 2020.]

Almost 7 years ago, Google decided to hide something marketers held dear: search terms leading to the website. It seems quaint, now, but there was a time Google made those search terms available to web analytics tools like WebTrends or Google Analytics. At the time, the online marketing world collectively gasped:

Search terms leading to the site provide user intent data that clicks, bounce rate, and most other types of quantitative stats do not. If you want to hear from your users directly without using a survey, you have two rich data sources:

  • What users type into a search engine to get to your website
  • What users type into your internal search engine

So what a lot of companies can do to staunch the bleeding is at least get what users are typing in when they get to an organization’s website. It is keyword intent, after all, albeit from inside the website.

If your site is one of the millions using Google Analytics, here’s a quick rundown of how to set it up, and how to maximize the tool.

Find Out How Your Search Parameters Work

This seems to be one of the biggest barriers to entry. Finding out what the URL parameter is for your site’s searches typically isn’t difficult – it’s usually the part after the question mark.

Say you perform a search on CNN. The resulting URL will look like this:

identifying url parameter for on-site search tracking example - cnn.com search results page for "amazon" showing edition.cnn.com/search?q=amazon as the URL

In this URL, “edition” is the subdomain, “cnn.com” is the domain, “search” is the path – you don’t need those sections. You need the part after the “?” – those are the parameters.

In this case, the query is “amazon,” and the query parameter is “q”. “q” is the part of the URL you need to enable internal site search.

Let’s try another website. Say you search for “jeans” on Guess’s website.

identifying url parameter for on-site search tracking example - shop.guess.com/en/ search results page for "jeans" showing shop.guess.com/en/?rrq=jeans as the URL

Once again, ignore everything before the question mark. Your actual query is the part represented by “=jeans” and the query parameter is “rrq” in this setting. To enable internal site search, you need to remember that you need to put in “q” or “rrq” as the query parameter inside Google Analytics.

Got it? Let’s dive in.

Setting Up Internal Search Tracking

  • Go to Google Analytics. In the lower left section, click on Admin.

setting up on-site search tracking in google analytics - google analytics home page with the admin link at the bottom

  • Below the third column, go to View Settings.

setting up on-site search tracking in google analytics - google analytics admin page page with the view settings link at the top of the third column

  • At the bottom of the screen, set Site search Tracking to ON.
  • Insert the query parameter (so in CNN’s case, “q”)

Here’s what that looks like:

setting up on-site search tracking in google analytics - google analytics view settings section with the site search tracking set to "on" and the query parameter field filled in

Click Save, and you’re pretty much done.

Well, you’re done with the setup. Now, you actually need to analyze the data.

Best Use Cases for Internal Search Analytics

Site search tracking is pretty nifty, but you need to actually know what you want to do with that data. Here are a few use cases:

Study the top search terms, and “group” buckets of intent

Find patterns in what people are searching for. This is about as close as you can get to “intent” data from a clickstream tool – visitors telling you exactly what they came to your website for.

Fix the pages where people can’t find what they need

If a lot of people search at specific parts of the website, that section may not be very usable. Look at not just what they are searching for, but where they are searching from – you might uncover “broken” sections of the web site.

Fix your search results

Of course, if you can modify the internal search engine based on results that need the most help, it’s best to do that for your most used queries. Amy Africa has tips for specific improvements that we’ve covered before.

That’s pretty much it for the basics. It’s time to get cracking – have you set up on site search tracking yet?