WebmasterID logoWebmasterID
Event tracking

The site_search event (view_search_results)

The site_search event (view_search_results in GA4) records that a visitor searched within your site. It is a direct window into intent — the words people type tell you what they expect to find. But search terms can contain personal data, so this is also one of the most sensitive events: you record that a search happened and, carefully, the term, with the privacy caveats front of mind.

Verified against primary sources

What this means

GA4 enhanced measurement detects site search by looking for common query parameters in the URL (such as q, s, search, query, keyword) and fires a view_search_results event with the search term. It turns your internal search box into an analytics source revealing what visitors expect your site to contain.

Intent value and sensitivity

Site search is high-signal: repeated searches for something you already publish means people cannot find it (a navigation problem); searches for something you do not have is a content gap. The catch is sensitivity — people type anything into a search box, including personal data. Decide deliberately whether to store the raw term, and review the parameters being matched.

How it appears in analytics and logs

A view_search_results event means an on-site search ran. Frequent searches for content you already have points to navigation problems; searches for missing content reveal gaps.

Diagnostic use case

Learn what visitors look for on your site to surface content gaps and navigation problems, while treating raw search terms as sensitive data.

What WebmasterID can help detect

WebmasterID can record that a search occurred as a first-party event while leaving sensitive raw terms out by default, so intent signals do not become a data-protection risk.

Common mistakes

Privacy and accuracy notes

Search terms can contain names, emails, or other personal data that visitors type. Treat the search-term parameter as sensitive, and consider disabling capture where queries are likely personal. This is educational, not legal advice.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.