If your website has a search bar, there’s a useful set of data sitting right there — what visitors looked for, what they couldn’t find, and where the gaps are between your content and your visitors’ actual questions. The problem is that GA4 doesn’t give you this in any standard report. You have to go find it, and the way to get there is a bit hidden.
It’s annoying that you have to dig for it, because the data is absolutely worth looking at. This post covers how to configure site search tracking in GA4, how to build a report for on-site search, and what to do once you have the numbers.
(If your site doesn’t have a search bar, this one isn’t for you. However, it might be worth asking whether adding one would help visitors find what they need!)
What On-Site Search Data Actually Tells You
When visitors use the search bar on your site, they’re giving you something incredibly useful: a statement, in their own words, of what they came looking for that your navigation didn’t help them find.
What I usually find when I look at this data is that there’s usually some gold hanging out in there. Your most-searched terms will typically point to content you have but that’s buried, content that could be clearer, or content you simply haven’t written yet. For example, even if you have pages for your refund or cancellation policy, but you also have lots of on-site searches for that, tells you that wherever it is, not only is it buried, but it says something about your quality of service.
Plus, when you combine on-site search terms with your Google Search Console branded queries, you can dig up some very useful insights, especially for your SEO team. What I sometimes find when I compare the two is that the same terms show up in both places. For example, someone searched your site for a thing, didn’t find it, and then Googled “[your brand] + [that thing].” You can see the site-search side of that story in your GA4 data and the Google-search side in Search Console. You should prioritize the queries you see show up in both places.
And even if you don’t see a lot of search volume, don’t ignore this data. Sure, twenty searches a month is thin by most analytics standards, but if those twenty people all wanted the same thing and you don’t have it, that’s a pretty clear signal!
How to Set Up On-Site Search Tracking in GA4 (Step by Step)
The Google recommended event name for on-site search tracking is view_search_results. It’s already built into GA4’s Enhanced Measurement feature, which fires events automatically when certain URL patterns are detected, which means that you don’t need anything extra to capture search data for the most common setups.
Before you go looking for data, confirm that Enhanced Measurement is actually on. It’s on by default in new GA4 properties, but sometimes I see people turning it off so it’s worth double-checking.
Here’s the steps to go through to check if the view_search_results event is set up correctly:
- Confirm Enhanced Measurement is enabled — Admin > Data streams > [your stream name] > Enhanced measurement toggle should be on
- Check that the site search event is enabled — Still on your stream details, click the settings wheel for Enhanced measurement and check that the Site search toggle is on.
- Check that your site works with the default settings — Do a quick search on your website. If on the search results page you see ?q=, ?s=, ?search=, ?query=, or ?keyword= (like in the image below), you’re all set. If not, review the next section.

If your site uses a parameter that isn’t in the standard list:
- Go into the advanced settings — Still on the Enhanced measurement settings, click the Show advanced settings option for Site search.
- Add the correct parameter(s) — Add your website’s parameter to the Search Term Query Parameter list. Make sure all terms are separated with a comma.
Tip: If your site’s search function doesn’t modify the URL at all when someone searches, this won’t work because GA4 has nothing to detect. In that case, you’d need to do some other sort of fancy footwork to track it. I typically use a custom event sent via Google Tag Manager that fires based on a DOM interaction or a dataLayer push. If you need that, that might be a conversation with your developer, or get in touch for some 1 on 1 help to get it set up.
If your site has more than one parameter, you can capture that too! Here is how:
- Go into the advanced settings — Still on the Enhanced measurement settings, click the Show advanced settings option for Site search.
- Add more parameters — Add any other parameter(s) in the Additional Query Parameters section. See the image below for an example of what an additional parameter might look like in a search result URL.

Here is what the Enhanced measurement settings would look like if your site search parameter was s and your additional parameter was category:

Now let’s make sure the event is recording properly. Go to Reports > Engagement > Events, look for view_search_results appearing. If you had to make changes to the settings, you’ll need to wait at least 24 hours for those changes to show up.
Create a Custom Report in GA4 for On-Site Search Data
Let’s create a report to make it easy to find this information.
- Go to Reports > Library. If you don’t see that option you may not have high enough permissions to create reports in your GA4 property; check with your administrator.
- Click +Create new report > Create detail report. Select the Blank option.
- Click on Dimensions and add Search term. Click Apply.
- Click on Metrics and add Event count. Click Apply.
- Click on +Add filter and add a filter where the Event name exactly matches view_search_results.
- Click Save and Save as a new report. Name the report something memorable!
- Click Back and add the report to a Collection, then publish your collection changes.
Now you’ll be able to see your report in your Reports navigation!

What to Do With Your On-Site Search Data
Once you have the report set up, here are some ideas on what to do with it.
Start with your top ten search terms. Are those things on your site? If yes, are they easy to find from the main navigation? Sometimes the most-searched terms point to content that absolutely exists, but visitors just couldn’t locate it quickly, which is a navigation problem, not a content gap.
Look for actual content gaps. If visitors are searching for something you don’t have, that’s a pretty easy content brief. If they’re searching for something you have but that’s performing poorly in organic search, that’s a signal to revisit that page and improve it.
Try the top searches for yourself. Try your top ten searches on your website. Are you happy with the results listed? If not, revisit your content and see what you can do to improve your search results.
On-Site Search as a Middle/Bottom Funnel Signal
Something else to consider about visitors who complete an on-site search is that many of these visitors often tend to be further along the path to conversion. Your search page might be that last piece standing between them and that conversion.
That’s because someone using your site search arrived with a specific question. At this point and depending on the search term they used, they may not be figuring out whether they have a problem but they’re instead trying to find your answer to a problem they already know they have. When you’re looking at your data, keep that in mind, and prioritize making sure that your search results for those “ready to go, just need one last question answered” type searches deliver value for those visitors.
I also recommend checking out your Google Search Console data along with this information. When I look at on-site search terms alongside a funnel position report based on Google Search Console data, what I sometimes find is the same terms appearing in both places. On-site search terms that also show up in your branded queries are telling you that there’s a gap between what visitors expect to find on your site and what they can actually locate. It also means that your search results for that phrase might not be very good at all, and visitors felt that they had to turn to Google to get their questions answered. That isn’t great, and should be prioritized as a fix.
Frequently Asked Questions
Search data is captured as a parameter on the view_search_results event. To view this data in GA4, you need to look at the Search term dimension. Make sure you have filtered that information to look at just view_search_results events or else you’ll see a lot of empty cells. The full steps to create a custom report are outlined above.
They are reporting on data from different sources. Google Search Console shows you what people searched on Google to find (or not find) your site. On-site search shows you what people looked for on your site after they arrived. Search Console tells you what brought them to you, while on-site search tells you what they couldn’t find once they got there. They’re both useful pieces of information!
A Good Place to Start
The first thing to do is check whether view_search_results is appearing in your Events report. If it is, you’re already collecting the data, you just need to look at the Search term dimension to see it. This can be a great way to highlight on-site improvements that you’ve been pushing for a while but they never seem to get prioritized.
If you want to do a broader review of your GA4 setup while you’re at it, my GA4 audit guide includes a free Data Studio dashboard that can show you many common GA4 issues in one place.