CX Optimization Agency Message Testing Blog Search Start 7-day trial for $1 Upskilling Playbooks Teams Community Find a job Resources Help

Set up Site Search in Google Analytics

Use case

Fix content gaps to improve user experience.

Upgrade for unlimited access to thousands of playbooks on increasing traffic, improving ROAS and more.

Start 7-day trial for $1

1. Configure Google Analytics to set up a site search based on a query parameter: the string that comes between the ? and = in the URL.

If your site doesn’t use ? in the URL for query parameters – some use # or other characters – you can do a URL rewrite with GTM to override anything that isn’t ?. Check this by searching on your site search and looking at the URL.

Join the discussion on how to complete this step.

2. Locate your query parameter by looking at your website URL in the browser address bar. The query parameter is the word or letter just before the equal sign and your search term. This will vary depending on your platform.

  • For WordPress, this is usually s.
  • For Squarespace or Wix, it’s q.
  • For PhotoShelter, it is I_DSC.
Join the discussion on how to complete this step.

3. Navigate to Admin > View Settings and enable Site search tracking. In the Query parameter field, enter the parameter you found earlier.

If you used more than one platform to create your site, enter additional parameters separated by a comma. If you have multiple views in GA, add this to all views that you want to analyze.

Tick Strip Query Parameters out of URL to exclude the extraneous unique session IDs that appear in the URLs, for a cleaner report. Click Save.

Join the discussion on how to complete this step.

4. View your traffic’s search terms in Google Analytics by navigating to Reports > Behavior > Site Search > Search Terms.

  • Search Term: The search term users entered in the search box on your website.
  • Total Unique Searches: The percentage of total unique searches for each keyword.
  • Results Page Views/Search:The average number of times the search results page was viewed after the search was performed.
  • % Search Exits: The percentage of exits from the site that occurred following a search instead of clicking on a result. This can indicate the searcher was not satisfied with the search results.
  • % Search Refinements: The percentage of searches where a user searched again immediately after a previous search. If this number is high, it may indicate that the search results are not accurate. 
  • Time After Search: The average amount of time visitors spent on the site after receiving search results. 
  • Avg. Search Depth: The number of pages viewed by visitors after receiving the search results.
Join the discussion on how to complete this step.

5. Analyze the data you get from the search terms and look for content gaps and user behavior trends.

Ask questions like:

  • Do certain queries get searched more than others and lead to exits? This is a sign that you have content gaps.
  • On which pages are people using search the most? This might show that your navigation is misleading.
  • How many searches do people do on average before exiting? 
  • What are the trends and patterns of user’s actions after they use search?
Join the discussion on how to complete this step.

6. Consider using other solutions if your site search functionality is non-standard, or you need extra features.

If your URLs are messy with different parameter types, you will need to use GTM to rewrite them. Google Data Studio and some CASE functions will provide the same visuals as GA, but greater flexibility in your reporting.

Join the discussion on how to complete this step.

Current Playbook:

Set up Site Search in Google Analytics

Aug 01, 2021

0 votes

Request a playbook

Get unlimited access

Thousands of playbooks on increasing traffic, improving ROAS and more.

Start 7-day trial for $1