Tracking Internal Site Searches in Google Analytics

Published December 18, 2015
Online search behavior reveals incredibly valuable data about your website visitors. It provides insight into how visitors found your site, what they were expecting to find, as well as the path they took once they got there. As marketers, we’ve gotten pretty good at looking at this search data to better understand the goals and the actions of our users.
However, sometimes we focus too much on how a user got to our site without ever considering what they searched for within the site. We’re so focused on the Google search, we ignore the internal one.
Internal site searches can reveal what potential customers are looking for after arriving on your site. For instance, potential customers may land on an ecommerce site from a brand search and then look for a specific product within the site once there. Even if they arrived via a product search, they may still use the site search to refine the query and get even more specific, for example, refining a search for sneakers to include the specific brand and style they are interested in purchasing.
Internal searches can also reveal areas of growth opportunity by uncovering situations where certain information may be unclear or lacking on your site. For example, if a large percentage of visitors are searching for your return policy or for specific support pages, this may be a sign this information should be made more visible on your site.
Thankfully for marketers, Google Analytics allows you to track internal site searches with a bit of customization. Let’s look at how to set up this tracking and how to view the data.



Setting Up Site Search Tracking

To set up site search tracking, navigate to the Admin section of your Google Analytics account. Next, choose your desired View and go to View Settings.

Scroll down to “Site search Tracking” and click the switch to toggle it on. Next, you’ll need to fill the “Query parameter” field based on the search result URLs produced by your site.


Setting up Site Search


To determine what parameter to enter, do a test search from within your site’s search bar. Next, look at the URL. You’ll likely see something similar to the following:

The query parameter is the letter or word immediately following the question mark in the URL, in this case the letter s.

The search term is the word or phrase following the equals sign, in this case “pumpkin.”

You should then enter the parameter into the text box. In this example, we’ve entered s into that field.

Once you save your edits, any future site searches will pull the search term (the portion of the URL following s=) and show that in the Site Search section of Google Analytics. Unfortunately, turning on this setting won’t apply retroactively to past searches, so this is an important step in early analytics configurations.

Note that different websites handle internal searches differently. Most WordPress sites will, by default, produce search result URLs similar to this example. If you see a different type of search result URL (for instance, sites built in Drupal have a page path using “search” rather than a single letter parameter), you may need to customize Google Analytics further to be able to see the data you want. For more detail on other ways to set up site search tracking, see this article.

Viewing Site Search Reports

To see your site search results, go to Behavior > Site Search > Overview. Here, you’ll see a breakdown of several stats related to site searches, as well as a list of top terms searched in the timeframe you’re viewing.


Site Search Overview


  • Sessions with Search: Total number of Sessions that involved someone completing at least one search within your site
  • Total Unique Searches: Total number of times people searched your site (excluding duplicate searches during the same visit)
  • Results Pageviews/Search: Average number of times people viewed the search results pages after completing a search
  • % Search Exits: Percentage of Sessions in which people left the site right after completing a search
  • % Search Refinements: Percentage of times people conducted an additional search after their initial search
  • Time after Search: Average amount of time spent on the site after completing a search
  • Average Search Depth: Average number of results pages people viewed after completing a search

Site Search Usage

The Usage report (Behavior > Site Search > Usage) allows you to perform user analysis by showing you more detailed data about those who searched within the site vs. those who didn’t. You can see overall traffic stats, engagement metrics, and conversion data.


Site Search Usage


In this example, we can immediately see the large difference in engagement for those who searched vs. those who didn’t. On average, those who searched looked at 7 pages per session, vs. just 1.59 for those who didn’t. In addition, average time on site for searchers stands at over 7 minutes, as opposed to just over 1 minute for other visitors. This data shows us that those who take the time to search are spending significantly more time on the site, and viewing more pages. As marketers, this poses additional questions requiring further exploration:

  1. Are people staying longer and reading more because they are not finding what they want or because they are simply more serious about reading content and learning?
  2. Are people who do NOT take the time to search not viewing more pages and consuming more content because they are finding answers more quickly? Or are they simply less tenacious than the on-site searchers and leaving because they are frustrated by an inability to find what they are after?

By testing alternate methods of presenting content on your pages and tracking the same metrics, you can begin to get answers to these questions and develop a more accurate sense of your users’ experiences.

Search Terms

The Search Terms report (Behavior > Site Search > Search Terms) is where you’re likely to spend the most time within the Site Search section of Google Analytics. Here, you can see every term searched within the timeframe you’re reviewing.


Site Search Terms


To get value from this report, you can analyze the data in several different ways:

  • Look at top searches (sorted by Total Unique Searches) to determine what people are most commonly looking for on your site. Do any of these terms indicate content that should be highlighted more readily for people coming to your site? If they’re searching for it, they may be confused about how to get to it in the interface.
  • Look at search terms showing a high average Time after Search. These indicate people are finding related content particularly valuable and are taking the time to read content or complete a purchase.
  • Use the search bar to search for multiple terms related to a topic. For instance, a search for juicer may yield juicer, juicers, best juicer, etc., all as relevant terms to people looking for information about juicers. These terms can help to guide future content, as well as show collective data for a topic.

Search Pages

The Pages report (Behavior > Site Search > Pages) will show you the pages where people started and ended their searches. This data can help to clue you into what topics people are searching most frequently. It can also show you which pages may be confusing users, leading them to use internal search to find where to go next. You can click any of the URLs to see specific terms people searched from each respective page.


Site Search Pages


In this example, we can see that the homepage ranks as the first place people search from. This is unsurprising considering that the homepage is where most visitors enter a site. Next, the Blog/Video section of the site ranks second, indicating people are looking for articles to read or videos to watch. Third, a number of users are entering the site directly from search, showing that they’re using the search bar that appears directly below a site’s listing in Google search results. Next, a number of people are searching from various pages in the Recipes section of the site, indicating that they’re looking for recipes to make (especially juices, smoothies, and desserts). Two of these examples show us opportunities to improve a user’s experience by providing a logical “next step.” This can mean showing links to related or popular content, or experimenting with new methods of presenting or organizing content by category. Users may still choose to use site search, even with more guidance available, but insights like these give us ideas for how to improve and even influence the user journey.


While site search tracking requires additional configuration in Google Analytics, for any site that offers internal site search, it is absolutely worth the time and effort to set up. Implementing site search tracking will allow you to glean actionable information about your website visitors. You’ll learn more about their intent when visiting your site, as well as identify some of their pain points and the kinds of content that they want to see but can’t immediately find. At the very least, this data will help you raise important questions that may require deeper investigation.

Tracking internal site search will allow you to learn from your users. By using this knowledge to give them a better on-site experience you can encourage return visitors and build a stronger business online.



When the client first came to you, you talked up the value of Google Analytics. You emphasized the importance of seeing where your traffic was coming from. You went on and on about how Google Analytics can show traffic sources to pinpoint whether people came from search, social media or a specific site referral, and how valuable this data was. You sold them on it, so much so that your client looked forward to receiving that first report, the magical day when they would finally understand where visitors were coming from.
But then the report came, and it looked like this:



It showed that 10% of your client’s traffic came from “(direct)/(none)”. What does this label mean? How do you explain Direct traffic to your client? Better yet, how do you explain “none”?
Let’s take a closer look at understanding Direct traffic in Google Analytics and how we can address it with clients.
Remember how your mom told you not to stand too close to the television because it might hurt your eyes?

The same rules can apply to data. If you’re too close, you may miss the patterns and trends that are crucial to understanding your website’s performance. You can’t judge a site’s performance looking at data in the bubble of a single day, you must consider any day’s traffic compared to the days before and after.

Google Analytics makes it fairly easy to analyze trends over long periods of time. But it also allows you to stand right in front of that TV, to look at more granular levels of time, right down to the hour.
There’s a better way to get that close to the data, without burning your retinas. We’ll cover how to analyze traffic effectively in today’s post.
Digital marketers spend a lot of time focused on PPC and SEO campaigns in order to drive desirable traffic to a website. The phrases we’re ranking for and bidding on get meticulous attention, so much so that we often forget about some of the other ways that visitors find us.

We put a tremendous amount of the effort we put into reviewing organic search data and PPC campaign performance in analytics. But how closely do we monitor referral reports?

If that’s not a channel you review regularly, you may be missing out on seeing traffic that is coming directly from links you’ve obtained around the web, local business listings, news mentions, and more. Many times, links are only considered as a means to an end, a metric that Google uses in determining how to rank sites in the SERPs (search engine results pages). But the fact is, many of a site’s links may be directly contributing to its traffic.

In this article, we’ll review how to look at referral reports in Google Analytics, and some of the many ways to use that data to better inform your web marketing decisions.