Site Search Tracking in GA4

Do you know what your website visitors are searching for after they land on your site?

If not, you are missing out on huge opportunities to improve your user experience, conversion rate, and probably revenue.

Site Search Results - GA4
Site Search Results – GA4

The good news is that site search tracking is a powerful Google Analytics 4 feature that can help you with that.

As one of the most useful yet underestimated features of GA4, it helps you uncover the exact intent, needs, and preferences of your users.

Here, you will discover:

  • Setting up site search tracking in GA4
  • Related GA4 reports
  • How site search traffic works
  • Why you should utilize this feature

along with extra tips & tricks and resources to improve your data tracking and reporting.

Let’s get started!

How to Set Up Site Search Tracking in Google Analytics 4 (GA4)

To set up site search tracking in GA4, you need to know your search term query parameter.

In order to learn that, you should basically go ahead and perform a search on your website.

Performing a Search on Your Website
Performing a Search on Your Website

Then, see the URL closely and identify the letters or sequences that you see just before the search term.

Search Query Parameter - Analyzify
Search Term Query Parameter – Analyzify

As you can tell, the search term query parameter is ‘s’, in this case.

Now, follow the steps below to configure site search tracking in GA4.

Navigate to Admin, then find ‘Data Streams’ under the ‘Property’ column

Data Streams

Click on the data stream you want to work on.

Choose Your Data Stream

Make sure that your ‘Enhanced Measurement’ is enabled. Then, click on the gear icon to see more settings.

Enhanced Measurement

First, you should see that the ‘Site search’ is enabled. Then, click ‘Show advanced settings’.

Advanced Settings

Here, you will see that some default search term query parameters are already added by Google as site searches are automatically tracked by GA4 once you enable Enhanced Measurement. Make sure that your search term query parameter is included.

Search Term Query Parameter

Save your changes by clicking ‘Save’ at the top right.


IMPORTANT: If you see a different search query parameter (one that is not included in the default parameters already set by Google) on your website when you check it as instructed before, you need to create a custom parameter so your “view_search_results” event can get fired.

For example, let’s say your website uses the “st” parameter in the URL to track the search term, then it might look something like this:


In this case, you have to add the “st” parameter into the Search Term Query box, as displayed below:

Search Term Query Parameters Settings - GA4
Search Term Query Parameters Settings – GA4

Also, if you want to collect values from additional parameters, such as “title”, you can add them to the ‘Additional Query Parameters’ section.

Now that you have finished the major part, there are a few more steps to set everything up correctly so you can monitor the related data. This time, you will create a custom dimension to register ‘search_term’.

Go to Admin, and click ‘Custom definitions’ under the ‘Property’ column. Then, click ‘Create custom dimension’.

Custom Definitions

Fill in the ‘Dimension name’ and ‘Event parameter’ fields as shown here.

Setting Up the Custom Dimension

Click save at the top right corner, and save your changes.


Site Search Tracking Reports in GA4

After completing the steps above successfully, you can now see site search tracking & results in reports after the data is processed within 24-48 hours.

You have two options to view these results:

  1. Events report
  2. Custom report

Site Search Results in Events Report

To see your site search results through the ‘Events’ report, navigate to Reports > Engagement > Events.

Then, type “search” in the search box to see the ‘view_search_results’ event.

Events Report - GA4
Events Report – GA4

Once you find the related event, you can click on it and get more data presented. You can scroll down and see the search terms data provided based on your users’ searches on your website.

Search Term Results - GA4
Search Term Results – GA4

Creating Custom Reports for Site Search Results (GA4)

You can also create a custom report through ‘Explore’ for a detailed overview of your site search results. Here’s how:

Click ‘Explore’ on the left menu, then click the plus icon to create a new exploration

Create a New Exploration

Name your report as “Site Searches” and set a date range, for example the last 30 days

Initial Settings

Click the plus icon next to ‘Dimensions’


Search for the dimensions “Search Term” and “Event name”. Click the checkbox next to them, and then click ‘Import’ to add them to your custom report

Find & Add Dimensions

Now, just as you did in ‘Dimensions’, click the plus icon next to ‘Metrics’ and then search for the metrics “Event count” and “Event count per user”. Then, click the checkbox next to them and then ‘Import’ to add them to your report


Now, double-click the “Search term” dimension, and both of the metrics

Create Your Report

Scroll down to ‘Filters’ and then choose ‘Event name’


Click on ‘Select match type’ and then choose ‘exactly matches’

Select Match Type

Find ‘View_search_results’ from the list and choose it. Then, click ‘Apply’


Now that you have completed all the steps, you can see your custom report for site search results

View Your Report

What is Site Search Tracking in GA4?

Site search tracking in GA4 is the process of collecting and analyzing data about the queries that your website visitors enter in your site search box.

It allows you to understand what your users are looking for, how they interact with your site search feature, and how satisfied they are with what they can find.

The data & reports generated here reveal the needs and preferences of your clients/visitors. You can analyze the keywords they use to find out which ones are more sought-after.

You can also discover new opportunities by identifying the specific products or services that your clients/visitors are looking for but you do not offer yet.

Therefore, this feature can play an important role in optimizing the performance of your website, which can turn into an integral part of your efforts to improve your conversions.

The Advantages of Site Search Tracking in Google Analytics 4

Site search tracking in Google Analytics 4 provides a number of advantages that you can leverage to better understand/analyze your website content.

It’s an easy way to understand your website visitors and optimize your website, navigation, design, SEO, and more.

By tracking site searches in GA4, you can access reports that provide valuable insights into your site search performance and user behaviour.

Some of the insights you can gain from site search reports are:

  • How many users use your site search feature and how often they use it
  • What are the most popular and unique site search terms that users enter on your website
  • How well your site search results match the user intent and expectations
  • How users navigate from the site search start page to the site search result page and beyond

Along with many others.

By analyzing these insights, you can identify the strengths and weaknesses of your site search feature, add/optimize the products or services that are on demand, and make improvements to enhance the user experience and conversion rate.

Some of the additional actions you can take are:

  1. Add or remove query parameters to capture the correct site search terms and exclude any irrelevant or duplicate events.
  2. Optimize your site search results page to display relevant and useful information, such as images, ratings, reviews, filters, etc.
  3. Improve your site search relevance and accuracy by using synonyms, misspellings, stemming, etc.
  4. Create or update your website content based on user demand and feedback from site search terms.
  5. Adjust your website navigation and design to make your site search feature more visible and accessible.
  6. Use site search terms as keywords for your SEO and PPC campaigns.

Conclusion: All about Site Search Tracking

Here, you have learned how to track site search in GA4 step by step, and how to use the site search reports to optimize your website content, design, and navigation.

By using the tips & tricks shared, you can easily set up your site search tracking and gain valuable insights into your site search performance and user behaviour.

But above all, make sure you have a GA4 setup that works well so you can get the most accurate data & results. You can use our comprehensive guidebook to do that easily: Shopify Google Analytics 4 (GA4) Guidebook.

Here are some additional resources for you to improve your data tracking & reporting:

1- How to Track Organic Search Traffic in GA4?
2- Basics of Enhanced Measurement Events in GA4
3- The 8 Most Important GA4 Settings You Need to Know
4- An Overview of Direct Traffic in GA4 and Methods for Optimization
5- GA4 Checkout Events on Shopify
6- The Best Shopify Facebook Pixel Apps