Insights

How to Augment Site Search Data in Google Analytics

To put it simply, site search lets you see what users are searching for on your site. You can analyze exactly who’s searching, what terms they’re searching for, and compare engagement for those that use this feature versus those that don’t.

Generally users that are searching on your site show strong intent as they’re actively trying to find information, so it’s a high value audience for you analyze and better understand.

Site search to me is one of the more undervalued features of Google Analytics, and today I’ll be walking you through how to make the most of it. Not only that, I’ll show you how to augment Google Analytics’ standard site search so that you’re measuring data you didn’t even realize you could.


What is Standard Site Search Tracking?

Standard site search lets you identify your internal search query parameter in your Google Analytics (GA) settings and allows for that search data to be used in reports. If your site also lets users refine their search terms, you can include that information in your reports as well.

For more information on how to set up standard site search, see the following link here.

How to Analyze Site Search Data

Method #1

See what people are searching for: Once you’ve set up standard site search tracking you can access it under Behavior > Site Search. Reports like the Search Terms report lets you see the keywords users search for and associated metrics. You can see in the screenshot below that “power bi” is a top search on the Seer site by readers like yourself!

Screen Shot 2019 08 22 at 2.47.54 PM

Method #2

See where they’re searching: Go to the Behavior > Site Search > Pages report to see what pages searches originate from.

If the goal of a page is to provide clear information on a topic, you shouldn’t expect to see a ton of searches related to that topic from that page.

Method #3

See if users are finding what they need: % Search Exits on the Search Terms report tells you the percentage of searches in which the user left your site after searching instead of clicking any of the results pages.

This translates to a bad user experience where the user’s not finding what they need and are forced to leave the site instead of engaging further. The higher the percentage (and the closer it gets to 100%), the less satisfied your users are and the more important it is for you to optimize your site search.

These are just three of the many ways you can be using the standard site search data.

Other Ways to Measure Site Search Activity

While GA’s standard site search reports can be extremely helpful, I’m going to show you a way to flip that concept on its head and track zero site searches.

To really understand trends, conversions from users who searched is only half the picture. It’s critical we understand why someone did NOT convert. One way we do this is to analyze what people searched for but failed to find.

Zero Search Results

On top of regular Site Search tracking, we will set up measurement for searches of keywords that do NOT have any results displayed.

This allows you to see where users have a need or question and they’re actively trying to have it answered, but your site just isn’t providing that information. That’s a huge point of friction that we can solve for using this data.

Zero search results are a gold mine of untapped user intent. This can be used to ideate content opportunities for specific keywords, as well as identify what users are seeking to better understand.

How to Implement Site Search Tracking with Google Tag Manager

First, you’ll need to perform a search that leads to zero results.

Think of the wackiest thing you can come up with that your site doesn’t have, and perform that search. I’ll use the Seer site as an example.

Screen Shot 2019 08 22 at 2.55.21 PM

Unfortunately, the Seer site doesn’t have any content around Corgis (we’ll have to fix that), but it makes for a great example.

When there’s no search results available, most sites typically display an error message. In this case it’s “Sorry, no results matched your search”. What we can do is identify the code for the error message, and use Google Tag Manager’s (GTM) element visibility trigger to fire a tag when that message is displayed on search pages. To do that, you’ll have to first grab the CSS selector for the message.

To learn more about how to identify CSS selectors and use it with GTM click here.

Then, you’ll need to set up a variable in GTM that populates with the error message when the error message loads on a search page.

Screen Shot 2019 08 22 at 3.00.40 PM

Once that’s done, you’ll need to set up a trigger for your tag.

Note that we’re using the trigger rules to specify that this tag should fire on search pages only, and also when the variable for the CSS selector specified populates with the error message.

Screen Shot 2019 08 22 at 3.02.25 PM

Lastly, you can set up your tag to have an event category that’s intuitive - we used “zero search results” in this instance.

For the event action we’re actually using a variable to pull in the search results keyword, which allows you to see exactly what term they’re searching for but aren’t getting any results. This will be the crux of any analysis you do with this data so it’s critical to set this piece up.

Screen Shot 2019 08 22 at 3.03.51 PM

The variable itself is relatively straightforward to set up.

You set up a URL variable in GTM and specify the built in Component Type as “Query” i.e. it’ll pull from a query parameter in the URL itself, and then specify the query parameter in the Query Key field. Note that query parameters differ based on an individual site so you’ll have to manually identify it.

Screen Shot 2019 08 22 at 3.06.18 PM

Now you can start to use the data to identify opportunities to optimize your site.

  1. For instance, if users are searching for a term over and over again that you actually do have content for it’s a matter of refining the site search experience so that that content actually shows up for those terms.
  2. If users are searching for a term that you do not have content for, and that volume is high, you could potentially develop content to fulfill that gap.

There’s a TON you could be doing with this data.


At Seer, we love to find ways to measure data that provides value. Additionally, we’re a GA 360 Premium Reseller, meaning we’re well versed in how to maximize the value of Google Analytics, as well as Google Analytics 360.

Feel free to SIGN UP FOR NEWSLETTER

We love helping marketers like you.

Sign up for our newsletter for forward-thinking digital marketers.