Site Search in Google Analytics – With or Without Query Parameters



Google Analytics comes with a lot of features “out-of-the-box”, but one of the reports that you will need to configure is the site search report. If you haven’t used this feature yet and you have a search box on your site, keep reading!

The site search reports provide data on what type of content people are looking for on your site. Having site search data is like reading the minds of a subset of your audience. You can easily see what they’re looking for, the words and terminology they are using and how quickly they found what they were looking for (or if they did at all).

For most websites, you can set up the site search reports entirely within Google Analytics, without needing to modify anything on your website.

The Site Search Reports

You will notice that the Site Search report is located under Behavior in the left-hand navigation and not Acquisition, where organic and paid search data is located. That’s because these reports are related to internal searches only – a behavior someone can perform on your site that returns results pages that are also on your site.

Site search tracking is not automatic like pageview tracking because there’s a wide variety of site search engines that function differently and because not every site has an internal search or wants to track that!

How you will set up your site’s search analytics will depend on what type of website you have and how it behaves. This may involve a simple one-click process, an advanced view filter, or a bit more configuration with on-page code or Google Tag Manager.

Find Your Search Term

Before heading into Google Analytics to update your settings, you’ll need to locate your keyword. The simplest way to do this is to go to your site and perform a search for something, anything! On the following page, take a look at the URL – do you see your keyword?

Most site will fall into one of two categories: query parameters or page paths.

Query Parameters – appear at the end of a URL following a question mark. You may see your keyword in a pattern that looks like the following:

Page Paths – appear in the middle of the URL, with no query parameters, and can look like the following:

Site Search with Queries

If you’ve identified that your search keywords show up in the query parameter portion of the site, you’re in luck! This is the easiest way to set up site search.

Site search settings are view-level, so they are located under Admin > View [the view you would like to configure] > View Settings. Below the AdWords settings, there will be an option to turn on the site search tracking. After switching it on, an empty field will appear titled ‘Query parameter.’


The next step is to go to your website and perform a search. Look for a question mark in the address bar as well as your search term. In the examples below, the search query is ’s’, though the actual query used will vary from site to site. Some other examples you may see are ‘q’, ‘searchTerm,’ ‘term’, and ‘keyword.’


It is easy to identify the query when there is only one parameter on the end of the url, but keep in mind that some sites have multiple queries for other purposes, so our keyword may show up somewhere else in the URL after an ampersand (&).


Once you have identified the query where your search keywords show up, you can then go back to the site search settings, fill in the search query (in this case, ‘s’) and you’re done!

This field must be populated in order to turn on the site search reports. If your site uses page paths or another method, you will still have to enter a ‘dummy’ parameter here. Any string or letter can be entered, just make sure your site isn’t using a parameter that matches this for other purposes.

In  most cases, you will also want to check the box to strip these queries out of the URL in Google Analytics. Keeping them will split views to the search results page into multiple rows in your page path report. This adds bloat to your report, and also is unnecessary since we will be able to see the individual keyword data in the site search report.

Page Path Search Terms (No Queries)

Another common behavior of site search, specifically with Drupal, is to have the terms appear within the page path instead of as a query. Neither is better or worse than the other, it will just involve different configuration in Google Analytics.


To track this type of site search, an advanced filter should be used for the views where you will be using these reports. First, navigate to Filters > New Filter under your view.

After choosing the filter name, select ‘Custom’ and ‘Advanced’ in the filter’s settings.


Next, we will choose ‘Request URI’ for Field A since we are getting the information from the URI, or page path. Your site’s page path goes in the text box, so for this example, it would look like below:


When we do this, we are telling Google Analytics to look at this page path and extract the characters from within the parentheses. The dot and asterisk are regular expressions representing any character and any number of characters- so we are storing anything after the slash.

Field B will be blank since we are only concerned with extracting from the page path and nowhere else. The next field, ‘Output To’, is the one we are interested in. Now that we have stored the keyword from the URI, we need to output it to the correct dimension.

In the dropdown menu, select ‘Search Term’ and type ‘$A1’ into the input box. This tells Google Analytics to grab the user-defined value from Field A and output it as a search term. For the checkbox options below, only ‘Field A Required’ and ‘Override Output Field’ need to be selected.

Once you are done, the settings should look like the following:


After you save the filter, your site search should be ready to start tracking. However, with this set-up you will still see the search keywords show up in your content reports and split your search results pages. If you have a site with a lot of search activity, this could potentially created hundreds of additional rows.


Stripping Keywords from the URL

Remember the setting we used to strip queries out of the URL? We can emulate that by using another filter.

In the same view where you implemented the advanced filter for site search, add a new filter. Select ‘Custom’ and ‘Search and Replace’ in the settings. The field dropdown should be ‘Request URI’ and in the first input box, type in the page path for your site searches along with the regular expression signifying ‘anything’.

In our example, this would be ‘/search/site/.*‘. The second input box is what we want to replace the former page path with. Since we are just stripping out the keyword after the slash, we will type in the page path without the keyword – ‘/search/site/‘. This will aggregate your search results page into one row in the content reports.



Once you have this tool, you can start to analyze internal search data and begin asking questions like:

  • “Should we take another look at the usability of our navigation? More than 10% of people are using our site’s search engine.”
  • “A lot of people from organic channels are looking for terms not related to our business. Why we are ranking for non-relevant keywords?”
  • “We are seeing trends of certain keywords. Should we feature this content more clearly on the site?”

You’ll notice that these reports will be relevant not only to your web analysts, but also to SEO, UX and even your design team.

Samantha is a Senior Analytics Consultant at LunaMetrics. She has a passion for exploring data and loves the excitement of finding solutions and explanations behind metrics. Her background includes advertising, SEO, and analytics as well as involvement in the arts. When she isn't logged into Google Analytics, she can be found testing her conversion rate at new things from golf to bread-making to new programming languages.

  • peter farrell have not articulated this very well…what do you mean?

    The simplest way to do this is to go to your site and perform a search for something, anything! On the following page, take a look at the URL – do you see your keyword?

    • meecect

      I believe what Chris James is saying (I have the same question) is that if you have a site like Drupal that uses a page path for search terms (not a query parameter), what do you need to do on the analytics view settings page with regard to search settings?

      IE, I set up the search filter (and the keywords stripping filter), but do I also need to turn on ‘Site search Tracking’ in the ;Site Search Settings’ section on the View Settings page?

      If so, it will not let me save the view without inputting a Query parameter, but I do not have a query paramter in this case, unless the Search terms filter is creating one for me.

  • Chris James

    As a GA user working on Drupal sites with no search query string (page path option) this has proved a great article!

    Issue i am having is when i am enabling site search it is asking me to populate a value in the ‘query parameter’ box. What should i be putting in there?

    Great article!

    • Samantha Barnes

      Hi Chris,

      You can put any placeholder parameter to turn it on, it won’t affect your reports.

      Sorry this is so late, but it’s a great question so I’ll respond in case others have the same issue.

      • raquel buzonerre

        Hi Samantha,

        Great tip for Drupal sites. Nevertheless I’m not sure to understand that last comment. Do you mean that we will go to introduce any character in the “Query parameter” field? Should we also select the “strip query parameters out of URL” option? thank you in advance

        • Samantha Barnes

          Hi Raquel,

          If you are using the Drupal option with advanced filters, any of the site search options in the View Settings will not affect your data. The reason I said to put any letter or word in the query field is because something (anything) has to be there to turn on the site search reports.

          The reason it will not affect your data is that these settings look at your URL query parameters. Since you do not have query parameters if you are using Drupal, choosing to strip out the keywords will not strip the keywords out of your page path.

          Hope this helps!

          • raquel buzonerre

            thank you Sam

  • Dominic Hurst

    Hi Samantha

    We have a site that adds a hashtags prior to the q, eg

    This is stopping queries appearing in results, any idea how to fix this?

    • Samantha Barnes

      By default, Google Analytics will ignore URL fragments- that’s what the hash mark is.

      However if you are using Google Tag Manager, you can store it as a variable, save is as a custom dimension and use that in the advanced filter.

  • victoria farrand

    Hi Samantha, thank you for a great post! My blog uses query parameters and I have set up the function as you described, but I am seeing “0.00% of your visits used site search”. My blog has a great bounce rate of 18.7% and most people enter through social media – very few people come in via organic search (only 10%), but I’d still like to find out what they’re searching for. Do you have any thoughts on other methods I could use to find out what search terms they’re using?

    • Samantha Barnes

      Unfortunately, the Site Search reports only tracks your onsite search engine (if you have one).

      To get organic search data from people coming to your site from search, Google Webmaster Tools provides much more keyword data than Google Analytics.

  • Chris Zac

    Hi Samantha,

    do I have to create a new view for this filters or can I use it in my standard view without filtering other data?

    thanks, Chris

    • Samantha Barnes

      Hi Chris,

      You can use the filter on your standard view without affecting your other data. This will only affect the Site Search report and dimensions.

  • Stefanie Panke

    Thanks for this article! I found the section ‘Page Path Search Terms (No Queries)’ for Drupal sites particularly useful.
    I have set up the filters as described to monitor search on our Drupal site. Now, I still do not see any results under Google Analytics / Behavior / Search. Is there any other way I can access the results of the two filters that I have set up? Do I need to activate them or create a special Dashboard to access the search tracking?

  • Cassiano Tartari

    I didn’t understand where should I go to visualize the filter data.

    • Samantha Barnes

      Hi Cassiano,

      If you are using the filter method, the data should go right into your Site Search report under Behavior.

  • Manish Basera

    My GA is not allowing me to set “Set search” on, can any one help?

    • Samantha Barnes

      Hi Manish,

      This might be a problem with permissions. You first have to make sure that you have ‘Edit’ permissions for the view that you would like to add Site Search to.

      Also, to turn on the site search reports, you must enter a query into the query box even if you will be using filters instead.

      Hope this helps!


  • Andreia

    Hello Samantha! Great article, much better than what you can find in Google Analytics Support. However, I am bit confused with page path search. First, you give an example:, and later on you write /search/site/(.*) in the first box of the advanced filter. So, first “site” appears before “search”, but when you define the filter the order is changed. My question is: which order should be used for the Request URI box if the page path is e.g. Have a great day!

    • Samantha Barnes

      Hi Andreia!

      The LunaMetrics example had[search term] because it is a very common structure for Drupal sites. However, if you do not have the “/site/” page path in you search result URL, you can leave it out.

      The first field of the Advanced Filter would then be “/search/(.*)”

      The parentheses and .* regular expression are placeholders for where the keyword show up.


  • Courtland Thomas

    I recently implemented this on GA for my Tumblr blog, but it does not output any search results in the reports.

    Has this been tried on Tumblr sites with success?

    • Samantha Barnes

      Hi Courtland,

      Since every CMS will be a little different, the first step is to visit your site and test the internal site search to see what the URL output is.

      I did a quick test on a Tumblr site and it looks like the internal search is like the following:

      The set-up would then be very similar, but instead of putting “/search/site/(.*)” into the first Advanced Filter field, you would put “/search/(.*)”

      Interestingly, I noticed that Tumblr also puts the search term in the Page Title as well (you may or may not want this).

      Hope this helps!

  • John

    Hi there, I’m wondering what the difference between exit rate and bounce rate are for on-site search results?

    • Samantha Barnes

      Hi John,

      The Exit Rate metric represents the percent of sessions where the results page was the last page of the session, no matter how many pages were viewed previously in that same session.

      For the Site Search reports, the Bounce Rate metric also represents sessions where the results page was the last page of the session, but it was also the only page of the session. This may be due to session timeouts, or worth looking into tracking issues if the number is large.

  • Toni

    This was one of the best explanations I’ve read. Thank you.

  • paul.booth

    On our site entering a search term in the search box and pressing enter loads a drop down from where you can pick where you want to go. The address bar only then populates with the address of the relevant page but there is no reference to any search term just our and takes you to the page. How would this work with GA given there are no parameters as such? I’ve tried the filters but to no avail.

    • NK

      I have the same question- my client’s site involves a booking engine and the url that loads after a search does not contain any of the searched values. ???

  • Joao Carpio

    Hi Samantha,

    My site fills on the 2nd group that uses “/” insted of “=”, since is a big classified site I’m already getting the GA Notification of “too many URLs”.

    So I’m looking for a way to take them away, my URL structure looks like this: = Only with search

    So if I use the filter given it would take that away which is great, but I’m wondering what if i get the following = Search + Filters

    In this case will it take all the filters too?, cause I’m interested in knowing which filters are being used.

    Thanks in advance,


  • Biggids

    Hi Samantha,

    Hope you are having a great weekend!

    Great post, thanks for the great guide which I’ve used and shared numerous times.

    I’m wondering how to set up Analytics if the site uses both a page path AND a query parameter? For example, /search/?search_phrase=[term]

    All the best,


  • Rashon Mitchell

    Hi Samantha,

    Thank you for the detailed article when dealing with site search.

    I followed your steps in the implementation of the site search and notice no data is being sent to Google Analytics. Is there addition steps to be made for the data to flow?

    Thanks for your time.


  • mr_bubs

    Thanks for this clear and straightforward explanation.

  • Scott Barnett

    Samantha – great article and reference. I have a site where neither of these apply – using Google Custom Search. You’ll see it at the top of It actually displays a popup and there’s no new URL created. I’ve been trying to figure out how to view the searches in GA, but no luck! Any ideas?

  • Adam

    Thanks for the post Samantha. I just implemented site search for

    I just wonder is there any way (in the site search reports) to exclude the traffic coming from AdWords and landing on a query pages like this one

  • Marzo

    Great post! I have a question, the Look and feel of my custom search is set to Full width, so I can’t see the search queries, what query parameters should I use when I am enabling the Site search Tracking?

  • Sachin Dhir

    Awesome… very well explained!!

  • Earley & Associates

    Hi – this is very helpful. I’ve got a Drupal website so my results url uses /search/site/. What wasn’t entirely clear in your explanation was what, if anything, do I put into the ‘Query parameter’ box one the view settings page now that I’ve set up the filters you describe? Thanks in advance!

    • Matthew Zageris

      I would love this answer as well.

    • Jennifer Farhoumand

      I am wondering the same thing- if your site search uses page paths, what should we enter in the query parameter box on the admin setup? Thanks!

      • Samantha Barnes

        Any string or letter can be placed in the field to turn the site search reports on. As long as your site doesn’t actually use the parameter you are entering, it will not interfere with your reports.

        • Denice

          Hi Samantha,

          I followed all the steps but still I can’t see data about the search behavior on my website. My website uses page paths (…) so I entered the /nl/search/(.*) etc. But I don’t know what to do with the query parameter, which keyword to enter. You describe here that I can enter everything (string or letter) as long as my site doesn’t use it as parameter. So I entered “l”, but no data was shown. Also I tipped the “delete query parameter bottom” but in my window I don’t see “search and replace”, so I added it as a new filter, please let me know if this is the purpose.

          Thanks in advance!

    • Samantha Barnes

      Hi Earley,

      Anything can be put into the ‘Query parameter’ box in order to turn it on to act as a dummy parameter since the field needs to be populated. Just make sure your site doesn’t actually use the parameter that you enter here.

  • Valerie

    Hi Samantha, thanks for the clear and helpful explanation! This has worked on several of our clients websites.
    For the moment we’re having problems with receiving the search terms of a client’s closed website (a portal for clients only and therefore behind a user login and password). The website uses the search query ‘search’ and this is also passed through in the URL. After installing the site search in Analytics a few weeks ago, we are still not receiving data about the used search terms. Might this be due to the fact that it’s a closed website or that we also use virtual pageviews for some pages? The URL looks like ‘
    Do you maybe see the issue why we aren’t receiving the search term used? Thanks in advance!

  • Kerstin Lembke

    Hi Samantha,
    Thanks for your easy-to-follow article. I managed to set up the Page Path Search Terms (No Queries) method and it works, yay! The only thing I don’t understand is that it results even my own queries although this should be filtered out as our IP addresses are excluded in this GA view?

  • Bitwise Solutions

    This is what I am seeing in my Search Overview:


  • Jasmin Patel

    Hi– I have done all the step you have mentioned in site search with out query parameter.I have added filter also. But I have one confusion Do I need to in this section currently I have pu this see the image… m not sure that this is correct or not.. please help me in this..

Contact Us.


24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us



We'll get back to you
in ONE business day.