TapCub is live — analytics, insights and live chat, free on one platform
Analytics

Site Search Tracking: Setup and the Six Metrics That Find Gaps

How to track site search as an event with a result count, the six site search metrics with formulas, a worked week of 2,400 searches, and what to do with zero-result queries, refinements and search exits.

Su He Published Nov 28, 2026 13 min read Analytics
Sample data: six queries account for 201 of 264 zero-result searches (76%). Fixing them would cut the zero-result rate from 11.0% to about 2.6% of 2,400 searches.Sample data

Site search tracking records what visitors type into your search box and what happens next. Track each search as an event with the query and the number of results, then read six ratios: search usage, searches per session, zero-result rate, click-through, refinements and search exits. The failures, not the top queries, show which content or products are missing.

What you will learn

  • Send the result count with every search; zero-result rate is the metric most directly tied to a fix
  • Read refinements without a click and search exits by query; they show where results look wrong or nothing fits
  • Searchers convert better mostly because of who searches; compare searches with and without results instead

What is site search tracking?

Site search tracking records what visitors type into your own website's search box and what happens next: whether results came back, whether they clicked one, searched again or left. It is the on-site half of search analytics; the other half, queries typed into search engines, comes from search-engine consoles rather than your own tracking.

Site search data is unusually direct. Most analytics infers intent from clicks; a search box hands you the visitor's own words. That is why the useful output is not the list of top queries but the failures: queries that returned nothing, searches followed by another search, and searches followed by an exit. Each one names content or products the visitor expected and did not find.

The method in this guide: track the query as an event with a result count, then read zero-result rate, search exits and refinements to find what is missing. The UK government's GOV.UK team, writing in December 2014, measured exactly these signals on nearly 1,000,000 searches a week and found that about 30% of searches were followed by a changed query and about 11% by an exit from the site.

How do you set up site search tracking?

There are two ways to capture searches, and you usually want both.

1. Read the query from the URL. If your results page has an address like /search?q=gift+card, the analytics script can read the q parameter on the pageview. This needs no code. Google Analytics 4's enhanced measurement, for example, recognises q, s, search, query and keyword by default and records a view_search_results event with a search_term parameter. The limit: the URL does not tell you how many results came back or which one was clicked.

2. Send a search event from the page. On the results page, send one event per search with the normalised query and the number of results:

tapcub.track('search', { query: 'gift card', results: 0 });

Then send a second event when a result is clicked, with its position:

tapcub.track('search_result_click', { query: 'gift card', position: 1 });

Rules that make the data usable later:

  • Normalise the query before sending: lowercase, trim spaces, collapse repeated spaces. "Gift Card" and "gift card " should be one row.
  • Send the result count, not just the query. Zero-result rate, the most actionable metric, depends on it.
  • Keep the event name fixed across web and app search so totals combine.
  • Do not send what visitors type into other fields. Only the search box. See the privacy section below.

Search-as-you-type boxes need one extra rule: send the event when the visitor submits or pauses for a set time (for example 1 second), not on every keystroke, or "gift card" will be counted as eight searches.

Which site search metrics matter, and how are they calculated?

Six metrics cover nearly every question about site search. Each is a ratio with a clear numerator and denominator:

MetricFormulaWhat it tells you
Search usage rateSessions with a search ÷ all sessionsHow much of your traffic depends on search
Searches per searching sessionSearches ÷ sessions with a searchHow hard people have to work to find things
Zero-result rateSearches returning 0 results ÷ all searchesContent or product gaps, synonyms and typos
Search click-through rateSearches with at least one result click ÷ all searchesWhether results look relevant
Refinement rateSearches followed by another search in the same session ÷ all searchesResults did not match the first query
Search exit rateSearches followed by leaving the site without a result click ÷ all searchesVisitors who gave up on the site after searching

Two more are useful for stores: conversion rate of searching sessions compared with non-searching sessions, and revenue per search. Both need the caution in the conversion section below.

MetricFormulaSample week
Search usage rateSessions with a search ÷ all sessions8.3%
Searches per searching sessionSearches ÷ sessions with a search1.6
Zero-result rateZero-result searches ÷ all searches11.0%
Search click-through rateSearches with a result click ÷ all searches65.0%
Refinement rateSearches followed by another search ÷ all searches25.0%
Search exit rateSearches followed by leaving without a click ÷ all searches12.5%

Sample data: 18,000 sessions, 1,500 with search, 2,400 searches in one week.

Worked week: 2,400 searches

Sample data: an online store, one week.

  • 18,000 sessions; 1,500 of them included at least one search.
  • 2,400 searches in total.
  • 264 searches returned zero results.
  • After each search, exactly one of four things happened next: the visitor clicked a result (1,560), searched again without clicking (480), left the site (300), or navigated elsewhere on the site without clicking (60). 1,560 + 480 + 300 + 60 = 2,400.
  • Another 120 searches came after a result click (visitor clicked, came back, searched again), so total refinements = 480 + 120 = 600.
MetricCalculationResult
Search usage rate1,500 ÷ 18,0008.3%
Searches per searching session2,400 ÷ 1,5001.6
Zero-result rate264 ÷ 2,40011.0%
Search click-through rate1,560 ÷ 2,40065.0%
Refinement rate600 ÷ 2,40025.0%
Search exit rate300 ÷ 2,40012.5%

For comparison, GOV.UK reported that only around 4.5% of sessions used site search in November 2014, with about 30% of searches refined and 11% followed by an exit. A government information site and a store are different, so treat those as a reference point, not a target. The numbers to act on are your own, week over week.

What should you do with zero-result queries?

Zero-result rate is the metric most directly tied to a fix. Sort the 264 zero-result searches by query and decide on each row:

Query (normalised)SearchesCauseFix
gift card58Product exists only as a footer link, not in the search indexAdd the gift card page to the index
returns41Help pages are not searchableIndex help and policy pages
size chart33No size guide page existsWrite one, link from product pages
wireless charger29Product not carriedMerchandising decision; meanwhile show related items
sweter22TypoAdd spelling tolerance or a synonym rule
black friday18Seasonal intent, no landing pageCreate the campaign page before the season
Other (long tail)63MixedReview monthly
Total264

The six named queries account for 201 of 264 zero-result searches, or 76%. That concentration is typical of search logs and is good news: a handful of fixes removes most of the failure. After the fixes, the expected zero-result rate is (264 − 201) ÷ 2,400 = 2.6%, assuming search volume and the rest of the mix stay the same.

Two rules for this table: review it weekly at first and monthly once stable; and record each fix with a date so you can see the zero-result count for that query fall.

app.tapcub.com

Top zero-result queries

sample week, searches
gift card58
returns41
size chart33
wireless charger29
sweter (typo)22
black friday18
Sample data
Sample data: six queries account for 201 of 264 zero-result searches (76%). Fixing them would cut the zero-result rate from 11.0% to about 2.6% of 2,400 searches.

How do you read refinements and search exits?

A refinement is not always a failure. Someone who searches "boots", sees results and then searches "waterproof boots size 9" is narrowing down, which is healthy. Separate the two kinds:

  • Refinement after a result click (120 in the example): usually exploration. Fine.
  • Refinement without a click (480): the first results did not look right. Look at the pairs of consecutive queries in these sessions. If "laptop bag" is often followed by "laptop sleeve", the two terms need to return each other's products.

Search exits are the strongest negative signal: the visitor searched, saw nothing worth clicking and left. The GOV.UK post called search exit percentage the least ambiguous of the standard statistics. In the example, 300 of 2,400 searches ended that way. Break exits down by query: a query with a high exit rate and plenty of results usually means poor ranking, not missing content.

Click position adds a third view. GOV.UK found the top result received more than twice the clicks of the second, and when lower positions out-clicked higher ones for a query, that pointed to a ranking problem. If you send position with each click event, the same check takes one query.

Do searchers convert better, and what does that prove?

In the sample week, 96 of 1,500 searching sessions placed an order (6.4%), against 330 of 16,500 non-searching sessions (2.0%). Searching sessions converted 3.2 times as often.

That ratio does not mean search causes 3.2 times the sales. Visitors who search usually arrive with a specific product in mind; they were already more likely to buy. The useful comparisons are within searchers:

  • Searches with results vs zero-result searches: if sessions that hit zero results convert at a fraction of those that found results, fixing the zero-result table is worth real revenue.
  • Before vs after a search fix, for the same queries.
  • Searching sessions over time: if search usage rises while searcher conversion holds, more visitors are finding things.

Treat the searcher vs non-searcher gap as a description of who searches, not as the value of search. Mapping where search sits in the buying path is covered in ecommerce funnel.

Can search queries contain personal data?

Yes. Visitors type order numbers, email addresses, phone numbers and sometimes full names into search boxes. Three precautions:

  1. Strip obvious identifiers before sending: patterns that look like emails, phone numbers or order IDs.
  2. Do not send other form fields as "queries". Track the search box only, the same way you would track website clicks: on purpose, element by element.
  3. Keep query reports internal and apply your normal retention period to them.

How to track site search in TapCub

TapCub has no dedicated site-search report with zero-result or exit rates built in; you build them from the search term TapCub already captures plus the events above. For the store in the worked week:

  1. Check the parameter. TapCub's website script stores the on-site search term on the pageview when the landing query matches a parameter name; the defaults are s, q and search, editable in Web analytics › Configuration › Web settings. If your results page uses ?keyword=, add it there, or the term is not captured. The terms appear under the search terms tab of Web analytics › Sources, split from organic and paid terms.
  2. Send the result count. Add tapcub.track('search', { query, results }) and search_result_click on the results page. Custom event properties keep at most 20 keys and strings up to 200 characters. Strings that look like an email or a phone number are rewritten to a placeholder by default, which covers the most common personal data typed into search boxes.
  3. Define the ratios once. In All-platform analytics › Behavior › Metrics & SQL, save two metrics, total search events filtered to results = 0 and total search events, then a formula metric dividing the first by the second: that is zero-result rate. Break the first metric down by query to get the zero-result table. The SQL tab can produce the next-action breakdown (click, refine, exit) from the event sequence within each session.
  4. Compare conversion. In All-platform analytics › Behavior › Behavior analysis, build a funnel from search to your purchase event, give the first step a filter of results = 0, then run it again with results greater than 0. That is the within-searchers comparison from the conversion section, which avoids the selection bias of searchers vs non-searchers.
  5. Mark each fix. Add an entry in Configuration › Annotations when you index help pages or add a synonym, then watch the zero-result count for those queries in the following weeks.

TapCub does not run or tune your search engine; it measures what visitors searched and what happened next.

FAQ

What are the most important site search metrics?

Zero-result rate, search exit rate and refinement rate, because each points to a specific gap. Add search usage rate (share of sessions with a search), search click-through rate and searches per searching session for context. In the sample week in this article: 8.3% usage, 11.0% zero results, 65% click-through, 25% refinements and 12.5% exits.

Either read the query from the results-page URL parameter (such as q or s), which needs no code, or send a custom search event with the normalised query and the number of results. Do both: the URL gives coverage, and the event adds the result count and result clicks you need for zero-result and click-through rates.

There is no published standard; it depends on catalogue size and how much spelling tolerance your search has. Track it weekly against your own baseline. A long tail of zero-result queries is normal; what matters is the head. In the example, six queries were 76% of zero-result searches, so fixing them could cut the rate from 11.0% to about 2.6%.

What is a search exit rate?

The share of searches after which the visitor left the site without clicking a result. In the sample week, 300 of 2,400 searches, or 12.5%. GOV.UK reported about 11% for its site in 2014 and called it the least ambiguous standard search statistic. Break it down by query to see which searches drive people away.

Do people who use site search convert better?

Usually, but that gap describes who searches rather than what search is worth. Searchers often arrive knowing what they want. In the sample, searching sessions converted at 6.4% versus 2.0%. A fairer test of search quality compares searches that returned results with zero-result searches, or the same queries before and after a fix.

Sources

  • GOV.UK Technology blog: Monitoring search performance on GOV.UK (December 22, 2014): about 30% refinements, about 11% search exits, around 4.5% of sessions using search, nearly 1,000,000 searches a week (checked 2026-11-28)
  • [Google Analytics Help: [GA4] Enhanced measurement events](https://support.google.com/analytics/answer/9216061): view_search_results, default parameters q, s, search, query, keyword (checked 2026-11-28)
Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

See what visitors search for

On-site search terms captured from the URL, custom search events with result counts, and funnels from search to purchase.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics