TL;DR, Quick Answer
8 min readGA4 site search is the enhanced measurement option that sends a view_search_results event with a search_term parameter when a results page carries one of the query parameters q, s, search, query or keyword. You can add your own parameters in the advanced settings, and extra ones arrive as q_ parameters. search_term already fills the predefined Search term dimension, so you don't register it. Sites that keep the term out of the URL send a search event with search_term themselves.
What is GA4 site search?
Google Analytics handles GA4 site search through the Site search option of enhanced measurement, which sends a view_search_results event with a search_term parameter each time a visitor lands on a results page whose URL carries a search query parameter. Google's enhanced measurement page says the event fires "each time a user is presented with a search results page, as indicated by the presence of a URL query parameter." Turn it on, confirm your search URLs use a parameter GA4 recognises, and read the terms in the Search term dimension.
Site search is one of the seven enhanced measurement options, next to scrolls, outbound clicks and file downloads, and it needs no code when your search already puts the term in the URL. When it doesn't, you send the event yourself, as covered further down.

How does GA4 detect a site search?
GA4 detects a site search by looking for a known query parameter in the page URL, then copying that parameter's value into search_term. Google lists the five parameters it checks by default:
qssearchquerykeyword
A visitor who searches for "running shoes" and lands on /search?q=running+shoes sends view_search_results with search_term set to the typed text. WordPress search uses ?s=, which is on the list. A site whose results page uses ?term= or ?k= sends nothing until you add that parameter.
Google's help page also notes one extra parameter: the event "only sends the unique_search_term parameter when it has a value of 1 (i.e. when the string is unique to that session)." That flag lets you separate first searches from repeats of the same term in one session.
How do you turn on GA4 site search tracking?
You turn on GA4 site search tracking in the enhanced measurement settings of your web data stream, with the Editor role or above. Google's steps:
- In Admin, under Data collection and modification, click Data streams.
- Click the name of your web data stream.
- Under Enhanced measurement, slide the switch on to enable all options.
- Open the Site search option to edit it and its advanced settings.
If you use the Google tag, Google adds that "you also need to make sure that each event is enabled for automatic event detection for your Google tag. By default, all event types are enabled." Check both places when the option is on and no view_search_results events arrive. After saving, run a search on your site and watch the Realtime report for the event.
How do you add your own search query parameters?
You add your own search query parameters in the Site search option's advanced settings, and GA4 offers two kinds. Google's page says "You can optionally configure this event to look for other URL query parameters," which covers the parameter that holds the term itself. It also lists optional parameters named "q_
| Setting | What you enter | What GA4 sends |
|---|---|---|
| Search term parameters | The parameter that holds the typed term, for example term | The value in search_term |
| Additional query parameters | Other parameters on the results URL, for example category | The value in q_category |
The second kind is useful for filters. A store whose results URL reads /search?term=jacket&category=women can keep the term in search_term and the filter in q_category. Google's enhanced measurement page does not state how many additional parameters the field accepts, so enter only the ones you plan to report on.
Do you need to register search_term as a custom dimension?
No, you don't register search_term as a custom dimension, because GA4 already maps it to a predefined dimension. Google's enhanced measurement page states "The search_term parameter populates the Search term dimension," and the dimensions reference describes Search term as "The term used to search your website or application." Google's custom dimensions page warns that registering a parameter "that is already a predefined dimension" is "not a best practice," since "it will use one of your custom dimension quota."
The q_ parameters are different. They are your own event parameters, so they need an event-scoped custom dimension before reports and explorations can show them. Create one per parameter in Admin under Data display, Custom definitions, using the exact name, such as q_category. Pick only filters you will act on, and use the guide to choosing dimensions from the decisions they inform to decide which ones earn a slot.

Where do you see GA4 search terms?
You see GA4 search terms in the Search term dimension, and the fastest way to read it is a free-form exploration. Build it like this:
- Open Explore and start a blank free-form exploration.
- Add the Search term and Event name dimensions, and the Event count and Total users metrics.
- Drag Search term into Rows and the two metrics into Values.
- Add a filter where Event name exactly matches
view_search_results.
Sort by event count to see what visitors look for most. Then look for terms your site has no page for. A term that keeps returning is content you should write or a product you should stock. Search terms also pair well with event tracking on the results page, such as a click on a result, so you can tell searches that found something from searches that ended in an exit.
Flowsery
Start Your 14-Day Free Trial
Real-time dashboard
Goal tracking
Cookie-free tracking
How do you track searches when the term is not in the URL?
You track searches without a URL parameter by sending the event yourself with the term in search_term. Search boxes that post a form, load results with JavaScript, or use a path such as /search/shoes give enhanced measurement nothing to read. Google's recommended events reference defines a search event with one required parameter, search_term, and gives this example:
gtag("event", "search", { search_term: "t-shirts" });Fire it from the code that runs the search, at the moment results appear, with the text the visitor typed. In Google Tag Manager, send the same event name and parameter from a GA4 event tag triggered by your search code. The Search term dimension accepts both routes: Google says to populate it "by sending the search_term parameter with the search or view_search_results event." Keep the two apart in your filters if you run both, or each search counts twice.
To count searches as a success metric, mark the event as a key event. The difference between key events and the older conversions label is in key events vs conversions in GA4.
Can GA4 search terms contain personal data or be thresholded?
GA4 search terms record whatever visitors type, so they hold personal data whenever someone types an email address, a phone number or an order ID into your search box. Google puts the duty on you: "You're required to ensure that no personally identifiable information is collected." If your search accepts that kind of input, strip it in your own code before the tag reads the URL, or send a cleaned term with a manual event.
Thresholds are the second limit. Google's data thresholds page says "If a report or exploration includes search query information, the row containing that data may be withheld if there aren't enough total users." Rare terms are the ones that disappear, and the guide to GA4 data thresholding explains how to spot the Data quality indicator and which changes Google says reduce withholding.
How does Flowsery count site searches?
Flowsery counts a site search as a custom goal that you name and send with one call, such as window.flowsery("search"), the syntax in Flowsery's custom goals docs. Its goal and event tracking page describes custom events for "any user action," goals with completion rates over time, and a real-time event feed to "debug and validate your tracking instantly." Flowsery funnels let you "select the pages or events that make up your conversion path," so a search event can sit as a step between a landing page and a signup. Flowsery's product pages do not list a search term report, but a goal can carry the typed term as a custom parameter, such as window.flowsery("search", { term: "running shoes" }). The docs allow a maximum of 10 custom parameters per event and string values of at most 255 characters, and the Goals card shows a breakdown of each parameter value and how many visitors matched it. The personal data rule above applies here too, so strip email addresses and phone numbers from the term before you send it.
Frequently asked questions
Is GA4 site search on by default?
Google's help page does not state a default for the Site search option. It says you slide the Enhanced measurement switch on to enable all options and click to edit individual ones. Open your web data stream to see the current state.
Which URL parameters does GA4 site search recognise?
By default, GA4 looks for q, s, search, query and keyword. You can configure the event to look for other URL query parameters in the Site search advanced settings. Any parameter not on the list sends no event.
What is the view_search_results event in GA4?
It is the event enhanced measurement sends when a visitor sees a search results page, as shown by a search query parameter in the URL. It carries the typed text in search_term. It also sends unique_search_term with a value of 1 when the term is unique to that session.
Why is my GA4 Search term dimension empty?
The Site search option is off, the event is disabled for automatic event detection in your Google tag, or your search URL uses a parameter GA4 does not check. Search boxes that keep the term out of the URL send nothing either. Add the parameter in advanced settings or send a search event with search_term.
What are q_ parameters in GA4 site search?
They are the additional query parameters you list in the Site search advanced settings. GA4 sends each one as q_ plus the parameter name, such as q_category. Register each one as an event-scoped custom dimension to report on it.
Should I use the search event or view_search_results?
Use view_search_results when enhanced measurement can read the term from your URL. Send the recommended search event with search_term when it cannot. Both populate the Search term dimension, so avoid sending both for the same search.
Who can turn on GA4 site search?
You need the Editor role or above. Open Admin, click Data streams, choose your web data stream and edit the Site search option under Enhanced measurement.
How do I find the most searched terms in GA4?
Build a free-form exploration with the Search term and Event name dimensions and the Event count metric. Put Search term in Rows, filter Event name to exactly match view_search_results, then sort by event count. A term that keeps returning with no matching page shows what to write or stock.
Why are some GA4 search terms missing from my report?
Google withholds a row that includes search query information when there aren't enough total users. Rare terms disappear first. The Data quality indicator tells you when this is happening.
Flowsery
Start Your 14-Day Free Trial
Real-time dashboard
Goal tracking
Cookie-free tracking
Does Flowsery show which words visitors search for?
Flowsery's product pages do not list a search term report. You can send each search as a custom goal with the term as a parameter, such as window.flowsery("search", { term: "running shoes" }), and the Goals card shows a breakdown of each term and how many visitors matched it. A funnel then shows whether those visitors convert afterwards.
Was This Article Helpful?
Let us know what you think!
See us more often in Google
One click marks Flowsery as a preferred source, so our articles sit higher in your Top Stories, AI Mode, and AI Overviews.
Before you go...
Flowsery
Revenue-first analytics for your website
Track every visitor, source, and conversion in real time. Simple, powerful, and cookie-free.
Real-time dashboard
Goal tracking
Cookie-free tracking
Related Glossary Terms


Why Your GA4 Bounce Rate Is Just Engagement Rate Flipped
Your GA4 bounce rate is the share of sessions that were not engaged. How Google defines it, how it differs from Universal Analytics, and where to add it.


What the GA4 Landing Page Report Counts and Where It Goes Blank
Google's GA4 landing page report lists the first page of every session. Where to find it, its default metrics, why (not set) rows appear and how to add source.


Setting GA4 User Properties and Reporting on Them
Set GA4 user properties with gtag or Tag Manager, register them as user-scoped custom dimensions and stay inside the 25-property limit.


How to Link Search Console to GA4 and Publish Its Reports
Learn how to link Search Console to GA4 in Admin, which roles you need, how to publish the two reports in Library and what the data can't join.


How to Build GA4 Calculated Metrics Inside a Five-Slot Quota
Google caps GA4 calculated metrics at 5 per standard property. Learn the formula syntax, the units, where they appear and what a formula can't use.


Setting Up GA4 Content Grouping With One Parameter
Set up GA4 content grouping with the content_group parameter in gtag or Tag Manager, read the Content group dimension and keep (not set) rows out.
Related Articles


How to Add Google Analytics Annotations in GA4 and Keep a Change Log
In GA4, Google Analytics annotations pin a dated note to line graphs. Who can add them, the 60 and 150 character limits, the 1,000 cap, and change log use.


What GA4 Custom Dimensions Do, and the Quotas That Cap Them
Registering GA4 custom dimensions turns your event parameters into report fields. See the three scopes, the 50, 25 and 10 quotas and the cardinality trap.


How the GA4 User ID Joins Signed-In Visits Across Devices
Sending a GA4 user ID links one signed-in person's sessions across devices. See the gtag setup, the 256-character rule, sign-out handling and the limits.

