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.
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:
http://example.com/?s=pumpkin
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.
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.
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.
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:
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.
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.
To get value from this report, you can analyze the data in several different ways:
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.
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.