Log in to your account
Sign up

How To Track Search and Zero Search Queries In Google Analytics

04 September 2018 | 0 comments | Posted by Che Kohler in nichemarket Advice

How to track internal search queries with GA

We all know how important search data is to digital marketing as marketers clamour for keyword data. The emphasis on gathering as much data as possible is to help give site owners oversight into what their customers are actually looking for, to stay relevant and competitive in the space.

Paid search marketers make use of Google Ads and Bing Ads keyword planners and search campaigns to unearth valuable keyword data. While organic search marketers tend to opt for tools like keyword.io or Moz.

While they are all great options, they do come at a price. If you do not have the budget for tools of this nature, you may want to look at free options just to get the ball rolling.

Free search data

Search console may be one of the last remaining keyword tools that provide you with free keyword data, and I highly recommend you set it up and integrate it with your Google Analytics account. This will provide you with a snippet of valuable organic keyword data specific to your website and can really be helpful in optimising performance.

Search console data is usually where most marketers would stop collecting free data, but there is still one avenue that not many websites are taking advantage of and this is internal search data.

Internal site search

The internal site search report is a tracking option available within Google Analytics which allows you to capture search queries made by users of your site. You could have a blog, eCommerce site, booking site or a directory site. Any website that requires you to add a query parameter to find content will be able to use internal search.

How to set up site search

Site Search must be set up for each reporting view in which you want to report on user search activity. To set up Site Search for a view:

  1. Sign in to your Analytics account.
  2. Click Admin, and navigate to the view in which you want to set up Site Search.
  3. Click View Settings.
  4. Under Site Search Settings, set Site Search Tracking to ON.
  5. In the Query Parameter field, enter the word or words that designate internal query parameters, such as term, search, query. Sometimes query parameters are designated by just a letter, such as s or q. Enter up to five parameters, separated by commas. Do not enter any additional characters: for example, if the query parameter is designated by the letter q, enter only q (not q=).
  6. Select whether or not you want Analytics to strip the query parameter from your URL. This strips only the parameters you provided and not any other parameters in the same URL.
  7. Turn Site search categories on or off. If your site lets users refine searches, you can include that information in your reports. For example, users might search for "MacBook" once they've refined the category to "laptops". In a case like this, the site-search URL would look something like ...?q=chromebookandamp;sc=laptop.
  8. If you leave categories OFF, you are finished. Click Save. If you turn categories ON:
    • In the Category parameter field, enter the letters that designate an internal search category such as 'cat,qc,sc'. As you did with the Query Parameter field, enter only the characters for the parameter, e.g., "sc", and not "sc=".
    • Select whether or not you want Analytics to strip the category parameters from your URL. Note that this strips only the parameters you provided and not any other parameters in the same URL. This has the same effect as excluding URL Query Parameters in your master reporting view: if you strip the category parameters from your Site Search view, you don't have to exclude them again from your master view.
    • Click Save.

How to identify search query parameters

This is where the tricky part comes in since every website CMS search works differently. If your site does make use of search query parameters in the URL, you will be able to track it using the following method.

For example, if you use Google to search the phrase Mountain View, you see q (Google's query parameter) followed by your query:


If you use a WordPress website


You're query string identifier will be "s"

If your site uses categories, then the same principle applies. If you're unsure on what your query string will be, you can also contact your us to identify it for your site.

Setting up site search for post-based search engines

If you're using a POST-based search engine that does not update URLs with parameters. The search-results URL would look something like:

http://www.example.com/search_results.php You have two options to use Site Search for POST-based search engines:

Option 1:

Configure your web application to append the query keywords to the end of the URL (e.g., http://www.example.com/search_results.php?q=keyword) and then set up Site Search as described in the previous section.

Option 2:

Customize the tracking code on your results page to dynamically specify a virtual page path that includes the query keywords. The tracking code on the results page would look something like:

analytics.js: ga('send', 'pageview', '/search_results.php?q=keyword');

You could also use Google Tag Manager to create a custom data layer to parse this to a virtual pageview tag and capture the search query via this method.

Note: This tracking method does not review which queries provide results and which do not. You will need to add a custom data layer push to add a zero result or result parameter into the URL in order to distinguish between the two.

How to view see internal site search data

Once your site search reports are all set up, and you want to view the data captured all you need to do is:

  1. Sign in to Google Analytics.
  2. Navigate to your view.
  3. Open Reports.
  4. Select Behavior > Site Search

You will then be able to see details like:

  • Which pages users search from,
  • Which keywords they use and under
  • Which category they're searching under (not set up by default)

Keywords are the key to success

Now that you can gather keyword data from your internal search you'll know exactly what people are looking for when hitting your site. What you need to show them more of, perhaps by featuring that content on the homepage and you can now identify where you possible content gaps are and improve your content strategy. For more on how to capture additional queries in GA check out our posts:

Contact us

If you want to know more about digital marketing for your site don’t be shy we’re happy to assist. Simply contact us

Are you looking to promote your business?

South African Business owners can create your free business listing on nichemarket. The more information you provide about your business, the easier it will be for your customers to find you online. Registering with nichemarket is easy; all you will need to do is head over to our sign up form and follow the instructions.

If you require a more detailed guide on how to create your profile or your listing, then we highly recommend you check out the following articles. 

Recommended reading

If you enjoyed this post and have a little extra time to dive deeper down the rabbit hole, why not check out the following posts about Google Analytics.

Tags: google analytics, search, Search Analytics

Previous: {{ previousBlog.sTitle }}

Posted {{ previousBlog.dtDatePosting }}

Next: {{ nextBlog.sTitle }}

Posted {{ nextBlog.dtDatePosting }}

You might also like

Generative Engine Optimization explained

What Is GEO (Generative Engine Optimization)?

01 March 2024

Posted by Che Kohler in nichemarket Advice

An introduction to generative engine optimisation, how it works and how it could be part of future SEO strategies as a way to generate traffic and co...

Read more
Tips to maintain your dogs oral health

How To Maintain Your Dog’s Oral Hygiene At Home

14 March 2024

Posted by James Uba in Fur, Fins & Feathers

A detailed look at how dog owners can put together a oral health care routine for their furry family member and ensure that their dogs pearly whites ...

Read more

Leave us a comment


{{comment.iDayLastEdit}} day ago

{{comment.iDayLastEdit}} days ago


Sign up for our newsletter