Behavior

How We Calculate Site Search Metrics

Metrics

Google Analytics uses the following formulas to calculate the metrics used in internal site search reports:

  • Sessions with Search = The number of sessions that used your site's search function at least once.

  • Percentage of sessions that used internal search = Sessions with Search / Total Sessions.

  • Total Unique Searches = The total number of times your site search was used. This excludes multiple searches on the same keyword during the same session.

  • Results Pageviews / Search = Pageviews of search result pages / Total Unique Searches.

  • Search Exits = The number of searches made immediately before leaving the site.

  • Percentage of Search Exits = Search Exits / Sessions with Search

  • Search Refinements = The number of times a user searched again immediately after performing a search.

  • Percentage Search Refinements = The percentage of searches that resulted in a search refinement. Calculated as Search Refinements / Pageviews of search result pages.

  • Time after Search = The average amount of time users spend on your site after performing a search. This is calculated as Sum of all search_duration across all searches / (search_transitions + 1)

  • Search Depth = The average number of pages viewed after performing a search. This is calculated as Sum of all search_depth across all searches / (search_transitions + 1)

Example Calculations
This section describes a user's experience with your website's search engine and explains how Google Analytics calculates the resulting data. The user progresses through three different pages when interacting with your website's search engine:

  • Search Page - Page on site where the user enters terms for a web search

  • Search Results Page - Results page that is returned on a search engine query

  • Results Pageview - The page viewed after a click on a results page

Assuming your website received three sessions from users that navigate as described below...

  • Session 1: (time between camera term search page and black camera term search page is 30 seconds; and black camera search to site exit is 60 seconds)
    • Search Term Page (term: camera) >:
    • Results Page >
    • view Results Pageview >
    • view Results Pageview >
    • Search Term Page (term: black camera) >
    • Search Results Page >
    • view Results Pageview >
    • view Results Pageview >
    • view Results Pageview >
    • Site exit
  • Session 2: (time between computer term search page to site exit is 15 seconds)
    • Search Page (term: computer) >
    • Results Page >
    • Site exit
  • Session 3:
    • No Search

...The following metrics can be calculated:

  • % Sessions used internal search = 2 Users that used site search (Session 1 & Session 2) / 3 Total Users = 66.7%
  • Sessions with Search = 2 (Session 1 & Session 2)
  • Total Unique Searches = 3 (camera, black camera, computer)
  • Results Pageviews / Search = (2 + 3) / 3 = 1.67
  • Search Exits = 1 (Session 2)
  • % Search Exits = 1 (Session 2) / 2 (Session 1 & Session 2) = 50%
  • Refinement = 1 (Session 1 - black camera)
  • % Refinement = 1 (Session 1 - black camera) / 3 = 33.3%
  • Time after Search = (30 seconds + 60 seconds + 15 seconds) / (1 + 1) [session 1 & session 2] = 52.5 sec
  • Search Depth = (2 [camera] + 3 [black camera] + 0 [computer]) / (1 [Session 1] + 1 [Session 2]) = 2.5
Goal Conversions

Goal conversions in the Site Search reports are calculated for sessions that include at least one search on your website. Goal conversions in all other reports calculate all sessions, and whether the session came via a site search or not. This helps you more accurately determine the effectiveness of the site search feature for your goals.