onsite search in GAYou have two sources for visitor intent:

  • What you can guess from data that’s attached to their visit, like whether they’ve been referred by social media or a display campaign
  • What the visitor tells you directly or indirectly

Data attached to the visit is fine, and it’s very useful.

Still, there’s nothing quite like your visitors telling you what they want. And there are two key avenues where visitors tell you exactly what they are trying to find:

  1. Web Site Surveys (here’s a rundown of tools if you don’t have one yet)
  2. On-site search

On-site search tracking is something you need, not just for the 5 to 10 percent of the traffic who will conduct a search on your site. You need it for the intent data you can glean for the rest of your visitors.

If you’re not tracking it yet, or if you need ideas to improve it, this Q & A is for you.

What is on-site search, exactly?

It’s a search that a user conducts AFTER they get to your site, as opposed to before the visit with a search from Google. Usually, that’s done from the search bar located at the upper-right corner of your site.

Search Bar

What do I need to enable on-site search?

You need a web analytics tool like Google Analytics. (WebTrends, Site Catalyst, etc. are fine as well – we’ll include steps for Google Analytics in this post, but the principles should be the same regardless of the tool.)

You’ll also need to observe what changes happen to the URL after a search gets conducted.

I have Google Analytics installed. What’s this URL business?

You need to note what gets added to the URL after a search happens.

For instance, on IBM.com, this is what happens after you search for “core metrics.”

Ibm Search Url 1

The question mark after www.ibm.com/Search/ tells the system that the URL path has ended, and that the next section is for “parameters.” The parameter added here, “q,” is what you need to know – note that the next thing you see on the URL string is the search phrase. In this case, “q=” tells the system what the search terms are.

A lot of sites use “q,” “query,” or “search” for this function.

Okay, got it. Where do I plug that value in Google Analytics to track on-site search?

Once you know whether it’s q, search, query, or something else that gets added, you need to go to Admin on the Google Analytics interface.

Then, under the third column, go to View Settings.

View Settings

From there, scroll to the bottom, set Site search Tracking to ON, then add the Query parameter. Remember, that’s usually “search” or “q” or some variant of “query.”

Site Search On 2

If you have a lot of other things added as parameters, you can tick the checkbox for Strip query parameters put of URL for cleaner search results.

Once you hit save, you’re done.

You can check the search terms after 24 hours.

All right, I have it set up. What can I do with the data?

On-site search is a pretty big topic, and we’ve covered both the data analysis and search improvement aspects before. Those articles are worth visiting if you’re new to the field or trying to improve your search experience:

If you’re looking for just the CliffsNotes version, though, you can start by thinking about how users use site search:

  • If people tend to start their on-site search on a particular page, that page may be broken from a navigation standpoint. Investigate what’s wrong, and fix it.
  • The most searched terms often correspond with things that people want to see most. Experiment with making those more prominent on visitor navigation paths.
  • If you have high exit rates for important/popular search terms, either fix your search engine so the right results come up, or set up “featured results” to get users to the right place, and stop them from leaving in droves.