WebmasterID logoWebmasterID
Event tracking

search vs view_search_results

GA4 defines two search-related events that are easy to confuse: search, a recommended event you fire when a user performs a search, and view_search_results, the event GA4 enhanced measurement fires automatically when a site-search results page is detected. They overlap in meaning but differ in origin and use. This page clarifies which is which, so you do not double-count on-site searches.

Verified against primary sources

What this means

view_search_results is fired by GA4 enhanced measurement when it detects a site-search results page from common query parameters in the URL — it is automatic for standard search implementations. search is a recommended event you send manually to mark that a user performed a search, useful when your search does not produce a detectable URL (for example an in-app or AJAX search box).

Which to use, and not double-counting

If your site search reloads to a results URL with a recognised query parameter, enhanced measurement already fires view_search_results — adding a manual search event for the same action double-counts. Use the manual search event when auto-detection cannot work: client-side search with no URL change, or non-standard parameters. Pick one path per search surface so a single search produces a single event, and treat the term as sensitive either way.

How it appears in analytics and logs

Seeing both search and view_search_results for the same query usually means a manual event duplicates enhanced measurement — one on-site search counted twice.

Diagnostic use case

Decide whether to rely on auto-collected view_search_results or fire a manual search event, and avoid counting one on-site search twice.

What WebmasterID can help detect

WebmasterID can record that a search happened without storing sensitive raw terms by default, sidestepping the duplication and privacy traps of both events.

Common mistakes

Privacy and accuracy notes

Both events can carry a search term, which may contain personal data visitors type. Treat the term parameter as sensitive regardless of which event you use. 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.