On this page
What this issue is
Site search tracking in GA4 is part of Enhanced measurement, a group of automatic events you switch on per data stream. When a visitor searches your site, GA4 looks at the results page URL. If it finds a known query parameter, it sends a view_search_results event with a search_term value.
Why it costs you leads or sales
The direct impact is low. Nothing breaks for visitors. But you lose a useful signal: what people look for and cannot find. Search terms show missing products, unclear pages and demand you could serve with new content or offers.
- Visitor searchesTypes a term in your search box
- Results page loadsURL is /results?find=boots
- GA4 checks parameter'find' is not in the list
- view_search_resultsNever sent
- Search term reportStays empty
The visitor search works, but GA4 never recognises the parameter.
How to check if your site has it
Run a search on your site
Search for a distinctive word and look at the address bar. Note the parameter name, for example ?find=boots. If the URL does not change, see the callout below.
Open the Enhanced measurement settings
In GA4 go to Admin > Data streams, choose your web stream, then open Enhanced measurement (the gear icon). Check that Site search is on and click Show advanced settings.
Compare the parameter lists
See whether the parameter from step 1 appears in the Search term query parameters box.
Look at DebugView
Open Admin > DebugView, run a search in a browser with debug mode on (for example the Tag Assistant extension) and look for view_search_results.
How to fix it
Open the stream settings
Admin > Data streams > your web stream > Enhanced measurement gear icon.
Turn on Site search
Switch the toggle on, then click Show advanced settings.
Enter the parameter
In Search term query parameters, list your parameter names separated by commas, for example q,s,search,query,keyword,find. Keep the defaults if other pages use them. Use the name only, without the question mark or equals sign.
Optional: track category parameters
Tick Include query parameters from the results page only if you want extra parameters, such as a category, to be recorded. Add them as custom dimensions to report on them.
Save
Click Save. Changes can take some time to show up in reports, so test with DebugView.
Use the default
The core search uses ?s=, which GA4 already recognises. Only add a parameter if a search plugin changes it.
Check plugin settings
Plugins such as WooCommerce product search use ?s= with post_type=product, which still works. Ajax search plugins may not change the URL.
Use the default
Shopify search results are at /search?q=term, and q is in the default list.
Check search apps
Predictive search apps can use their own results page or parameter. Run a search and read the URL.
For URL-less search
Create a trigger (Custom Event or Element Visibility) for your results display, then a GA4 Event tag named view_search_results with a search_term parameter taken from a variable.
Turn off the duplicate
If Enhanced measurement site search also works, avoid sending both so events are not counted twice.
Check the parameter
Webflow's built-in search uses /search?query=term, and query is in the default list.
Check the URL
Run a search and read the results URL. If it has a parameter, add that name in GA4. If it has none, use a custom event.
Use the default
Squarespace search uses /search?q=term, which GA4 recognises.
Send the event yourself
If results load without a URL change, push a custom event after the results render using the code below.
// Call after your results have rendered
gtag('event', 'view_search_results', {
search_term: 'running shoes'
});How to confirm it's fixed
- Run a search on the live site in a browser with debug mode on.
- See view_search_results in Admin > DebugView with the right search_term value.
- The event shows in Reports > Realtime within a few minutes.
- After a day, search_term appears in Explore or in a report where you register it.
- Searches with different words each produce a separate search_term value.
How to prevent it happening again
- Re-test site search after changing themes, search plugins or apps.
- Note your search parameter in your tracking documentation.
- Do not run both Enhanced measurement and a custom search event without a plan.
- Review the search term report monthly; a sudden stop means something changed.
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. It is a GA4 property setting and a reporting question, not a broken step in a lead form, checkout or booking journey. The kind of tool that fits is a GA4 configuration audit or analytics QA tool, or simply GA4's own DebugView and Tag Assistant.
Questions people ask
Why is my GA4 site search report empty?
Most often your search results URL uses a query parameter GA4 does not know, or the results load without changing the URL. Check the address bar after a search, then add the parameter under Enhanced measurement > Site search > Show advanced settings.
What query parameters does GA4 look for by default?
GA4 looks for q, s, search, query and keyword in the results page URL. If your search uses another name, such as find or term, you must add it manually in the Enhanced measurement advanced settings.
How do I set up site search tracking in GA4?
Go to Admin > Data streams, open your web stream, click the Enhanced measurement gear and switch on Site search. Then open Show advanced settings and list your search parameter names, separated by commas, and save.
Why is view_search_results not firing in GA4?
Either Site search is switched off, the parameter name is not in your list, or the search does not change the URL. Check each with DebugView. For searches without a URL change, send the event through Google Tag Manager or gtag.js.
How do I track site search in GA4 if my URL has no query parameter?
Send a custom view_search_results event with a search_term parameter after results render. You can do this with a Google Tag Manager trigger and GA4 Event tag, or a direct gtag call from your site code.
Why can't I see search_term in my GA4 reports?
The event may be firing but the parameter is not registered. Create a custom dimension in Admin > Custom definitions with the event parameter search_term. It only applies to data collected after you create it.
Does missing site search tracking affect my conversions?
No. It does not stop forms or checkouts from working or being counted. It only removes the insight into what visitors search for, so the business impact is low.
Related issues
- TRK-001GA4 tag missing from a funnel pageFix guide
- TRK-005Two GA4 measurement IDs sending to the same propertyFix guide
- TRK-006GA4 installed twice (gtag.js and GTM) causing double page_viewsFix guide
- TRK-008gtag.js loaded but config command never calledFix guide
- TRK-021Hits marked traffic_type=internal for all visitorsFix guide
- TRK-022Test traffic not marked internal (pollutes reports)Fix guide