How to Set Up and Use On Site Search Tracking (In Google Analytics)

This post was originally published in December 2013 and has been updated to reflect the interface of Google Analytics in 2018.

Over 4 years ago, Google decided to hide something marketers hold 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 web site
  • 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:

In this URL, “edition” is the subdomain, “” 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 “korea,” 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.

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

Got it? Let’s dive in.

Setting Up Internal Search Tracking

  • Go to the Google Analytics interface and select the cog to go to Admin.
  • Below the third column, go to View Settings.
  • 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:

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?

Take your conversions to the next level.

Learn how our experts at SiteTuners can help kickstart your conversion rate optimization process or get better results from your CRO efforts. Give us 30 minutes, and we’ll show you a roadmap to your digital growth!

Schedule A Call Now!