Skip to main content
Free5 minutesBeginner

How do I track internal site searches on my website?

Zenovay automatically captures searches from common URL parameters, or you can report SPA searches manually with one tracker call. Here's how.

site-searchjavascripttracker-api
Last updated:

Site Search is what visitors type into the search box on your own site. Zenovay surfaces these queries under your website → Analytics → Site Search — a sortable table showing each query, its share of all searches, and how many returned no results, with a No-results only filter and a page-URL filter. It is free on every plan.

Automatic (no code)

If your search results page uses a URL parameter for the query, Zenovay captures it automatically as soon as the tracker is installed — no extra code.

Supported parameters, in precedence order (the first non-empty one wins):

  1. ?q=
  2. ?query=
  3. ?search=
  4. ?s= (the WordPress default)

The captured term is capped at 256 characters. Example URL:

https://example.com/search?q=annual+report

That visit is recorded with the search term annual report.

If your search box filters results in place without changing the URL, report the search yourself when it is submitted:

window.zenovay('track', 'search', { query: 'user query', results_count: 12 });

Call this when the search is committed (the user presses Enter or clicks the search button) — not on every keystroke. Fire it once per committed search.

  • query — the text the visitor searched for.
  • results_count — the number of results returned. Use 0 when nothing matched. This powers the zero-result insight, which highlights searches that found nothing so you can spot content gaps.

Where to see it

Open your website → Analytics → Site Search. The table shows the top queries for the selected period with sortable columns:

  • Searches — how many times the term was searched.
  • % of searches — that term's share of all searches.
  • No-results — how many of those searches returned nothing.

Use the No-results only filter to focus on content gaps, and the page-URL filter to scope the table to searches made on a specific page. The Find query box searches your full search history for the selected period server-side — not just the rows shown — so a rarely-used query that falls outside the top of the table by volume is still found when you type it.

A note on privacy

Search terms are what your visitors typed, so they can occasionally contain personal information (an email address, a name). For that reason the Site Search table is owner-only: it is excluded from public shared dashboards. Keep this in mind if you share search data outside your team.

Was this article helpful?