You open GA4 to understand why sales dipped this week. Traffic sources, engagement rate, page views: it's all there, except the one thing that would say plainly what your visitors wanted to buy.

That information does exist: it's the words they type into your search bar. GA4 can record them for free, as long as you turn on the right setting and know where to find them. We'll walk through it all, from setup to decision.

👉 The short answer
  • Turn on Site search in the enhanced measurement settings of your web data stream.
  • GA4 then records the view_search_results event with the search_term parameter, which holds the text typed.
  • It detects searches from the URL (q, s, search, query, keyword): add your own parameter if it's different.
  • If your search doesn't change the URL, send the event yourself with gtag.
  • To read the data: Explore, a Free form exploration, the Search term dimension.

Why these queries are worth gold

A search query isn't traffic to interpret, it's an explicit request. Someone who types "sleeping bag -10 degrees" or "wedding guest dress" is telling you exactly what they want to buy, in their own words.

It's the voice of the customer, with no survey or panel. And it comes from a large share of your audience:

Search is the first reflex for a large share of visitors

Nearly one user in two prefers the search bar over menu navigation to find a product. Every one of those searches can land in your GA4.

Source: Baymard Institute, Ecommerce Search UX Best Practices, 2026.

Tracking is native to GA4 and costs nothing. Yet in most stores this data goes unused, either because the option was never turned on, or because it's on but captures nothing.

What GA4 records when a visitor searches

When tracking is active, every search fires the view_search_results event. It carries the search_term parameter, which holds the text exactly as typed: that's what feeds the Search term dimension in your reports.

This tracking is part of enhanced measurement, the automatic collection GA4 offers without code. It doesn't guess anything: it reads the URL of your results page and picks up the value of a query parameter. By default it watches five: q, s, search, query and keyword.

Diagram of how a search reaches GA4: URL parameter or manual event, view_search_results event, exploration
Two paths lead to the same event: automatic reading of the URL, or a manual send when the URL doesn't change.
⚠️ Check this first

Run a search on your own site and look at the URL. If it looks like /search?q=shoes, GA4 can pick up the query through q. If the URL doesn't change at all (common with a widget or instant search), automatic tracking will see nothing, and it won't warn you: go straight to the section on manual sending.

Step 1: turn on site search

Admin > Data streams5 minutes

None of this needs a developer if your search already changes the URL.

  1. Open Admin, then under Data collection and modification, click Data streams.
  2. Click your web stream.
  3. Under Enhanced measurement, check that the switch is on, then click the gear icon.
  4. Check that Site search is on, and open its advanced settings if your site uses a different URL parameter.
⚠️ The custom parameter trap

If your results page looks like /results?term=shoes, GA4 won't recognize term on its own. Add it to the list of search query parameters in the option's settings. Without that, the option is "on" but never reports anything.

As soon as it's on, GA4 starts recording view_search_results. Collection isn't retroactive: it starts the moment you turn the option on. Let a few days of traffic build up before drawing conclusions.

Step 2: check that searches come through

No need to wait a week to find out nothing is coming in. The test takes two minutes.

  1. Open GA4's Realtime report in one tab.
  2. In another tab, run a search on your site with an easy-to-spot word.
  3. Go back to the report: the view_search_results event should show up among the events received. Click it to see the value of search_term.
💡 Tip

Test with a term no customer will ever type, such as "testga4". You'll spot it without any doubt, and if you repeat the test with "women's rain jacket", you'll also know that apostrophes and spaces come through correctly.

Step 3: build the search terms exploration

Explore > Free form10 minutes, once

Unlike the old Universal Analytics, GA4 doesn't show a ready-made "site search" report. The most effective approach is an exploration, built once and reopened every week.

  1. Click Explore in the left navigation, then pick the Free form template.
  2. In the Variables column, click the + next to Dimensions, tick Search term and Event name, then IMPORT.
  3. Do the same for metrics with Event count and Active users.
  4. Drag Search term into Rows and both metrics into Values, in the Tab Settings panel.
  5. Add a filter: Event name exactly matches view_search_results.
Exploration settingsTemplate : Free form Rows : Search term Values : Event count, Active users Filter : Event name = view_search_results Sort : Event count, descending Date range : Last 28 days

You get the list of every term typed on your site, sorted by volume, in your customers' real vocabulary. The exploration stays in your list, ready to reopen. To go further, add a second dimension such as device or session source.

⚠️ Watch out

Explorations can't go further back than the property's data retention period: 2 or 14 months on a standard property. If yours is set to 2 months, comparing one season with the next is impossible. The setting lives under Admin > Data Settings > Data Retention.

Search without a URL change: send the event yourself

Many modern search engines, including instant search widgets, display results in a layer on top of the page without changing the URL. Automatic tracking relies on the URL, so it sees nothing. You need to send the event at the moment the visitor runs their search.

Example event to firegtag('event', 'view_search_results', { search_term: 'hiking boots' });

It's the same standard event as the one enhanced measurement sends: fired manually, it feeds exactly the same reports and the same Search term dimension. This example assumes the GA4 tag is already loaded on the page. If your site runs on Google Tag Manager, the logic is identical with a GA4 event tag of the same name.

If you use Vectail, these queries are already listed and sorted in the search engine's dashboard, with no GA4 setup at all. Manual sending is then only useful if you want everything centralized in Analytics.

Four readings that lead to decisions

Once the data is flowing, the point isn't to admire a ranking of terms, it's to turn it into work items. Four readings stand out, from the most obvious to the most profitable.

Diagram: four readings of search terms in GA4 and the matching action for each
Each reading leads to a specific workstream, on the catalog side or on what you feature.

1. The most searched terms

This is real demand, ranked by your customers themselves. A product or category that dominates your searches deserves a prime spot in navigation, on the home page and in your campaigns. A heavily searched term that points to a thin catalog, on the other hand, is a signal to buy stock or widen the range.

2. Your customers' real vocabulary

Your visitors rarely use the words on your product pages. They type "fridge", "sneakers" or "windbreaker" while your catalog says "refrigerator", "athletic shoes" or "waterproof jacket". This list helps you rewrite product titles, feed your synonyms and fuel your SEO with the phrases people actually use.

📌 Real-world example

Picture an outdoor store that logs 5,000 searches in a month. "Head torch" comes second with 350 searches, while the catalog files these products under "headlamp". If one search in three for that term finds nothing relevant, that's about 117 visitors a month (350 ÷ 3) who leave without seeing the products. A "head torch = headlamp" synonym, or the words added to product titles, takes a few minutes to set up.

3. Lots of searches, few purchases after

Some frequent queries lead nowhere. Technically, the engine answered; commercially, it missed. These are often relevance, title or categorization problems.

⚠️ Watch out

Putting a purchase metric next to Search term in the table doesn't work: the term is attached to the search event, not to the purchase, and sales end up in a "(not set)" row. To link a term to sales, create a session segment that includes view_search_results with that term, then compare that segment's purchases with all sessions.

4. Emerging terms

Compare two periods. A term that climbs from one week to the next signals a trend, a season starting or the effect of a campaign. Spotted early, it gives you time to adjust what you feature before your competitors do.

GA4's limit: it doesn't know whether the engine answered

GA4 tells you what people search for. Out of the box, it doesn't tell you whether your engine found anything: a search that returns zero results and one that returns thirty relevant products send the same view_search_results event.

That's a serious blind spot, because zero-result searches drive away your most determined customers. According to the Baymard Institute (2026), 56% of e-commerce sites don't adequately support their users' search needs. To spot them in GA4, add the number of results to the event:

Example with the number of resultsgtag('event', 'view_search_results', { search_term: 'head torch', results_count: 0 });

The results_count parameter isn't standard: register it as a custom dimension (Admin > Data display > Custom definitions) so you can filter your explorations on the value 0. This takes some technical work.

The two tools complement each other. GA4 is great at linking search to the rest of the journey (source, device, conversion). A search engine like Vectail, for its part, shows the list of zero-result queries, sorted by frequency, with nothing to configure: GA4 for the marketing context, the engine's dashboard for the product diagnosis.

From analysis to action

A report that never turns into a decision is useless. Here's how to convert your exploration into concrete work, from the quickest to the most structural.

  • Pull the 20 most searched terms and check, for each one, that the first results page is relevant. A single poorly served search in that top 20 carries a lot of volume.
  • Spot vocabulary gaps (the customer says "fridge", the catalog says "refrigerator") and handle them with synonyms rather than rewriting the whole catalog.
  • Fix product data for terms that find little or the wrong thing: readable titles, unique descriptions, clean attributes and categories. Our article on product data mistakes lists the most common ones.
  • Track changes over time. An exploration reviewed every week beats a thorough audit forgotten the following month.
✅ Do
  • Test tracking in Realtime as soon as it's on
  • Filter the exploration on view_search_results
  • Review the top 20 every week
❌ Don't
  • Draw conclusions after two days of data
  • Read purchases right next to the term
  • Leave data retention at 2 months

Your checklist

  • Enhanced measurement on for the web stream, Site search option enabled
  • Your results page's URL parameter included in the watched list
  • Realtime test passed: view_search_results and search_term visible
  • Manual gtag event in place if search doesn't change the URL
  • Free form exploration created, filtered on view_search_results
  • Data retention set to 14 months
  • Top 20 terms checked, vocabulary gaps handled as synonyms
  • Zero-result searches tracked (dedicated parameter or the engine's dashboard)

Frequently asked questions

Is site search tracking in GA4 free?

Yes. Site search is part of GA4's enhanced measurement: it is built into the tool, with no plugin or third-party tool. You just need to turn the option on for your web data stream.

Why can't I see any search terms in GA4?

The most common causes: the Site search option is off, your results page uses a URL parameter GA4 does not watch, your search displays results without changing the URL, or you are looking at a period before you turned it on (collection is not retroactive).

Where is the site search report in GA4?

GA4 has no ready-made report like the old Universal Analytics. The simplest option is a Free form exploration with the Search term dimension in rows and a metric such as Event count in values.

Can GA4 show searches with no results?

Not out of the box: an empty search and a successful one send the same view_search_results event. You have to add a parameter with the number of results yourself, then register it as a custom dimension, which takes some technical work.

Sources

  1. Baymard Institute, Ecommerce Search UX Best Practices, 2026 (share of users who prefer search, 56% of sites falling short of expectations).

See every query, without building GA4 tracking

Vectail connects to your Google Merchant Center and shows searched terms and zero-result searches directly, search engine included. One line of code, powered by Google Vertex AI.

Start free - 14 days, no credit card