How to See What Users Search for on Your Website with Google Analytics 4 (GA4)

DJC > Tutorials

In this tutorial, you’ll learn how to see what users are searching for within your website using Google Analytics 4 (GA4).
This will help you understand which content, products, or topics are most interesting to your visitors and improve the internal search experience.


1. Why It’s Important to Measure Internal Searches

Knowing what users search for on your site helps you: - Identify the most demanded topics or products.
- Detect searches with no results (opportunities to create new content).
- Improve navigation and internal SEO.
- Evaluate the effectiveness of your site’s search feature.


2. Prerequisites

Before you start, make sure you have: - Google Analytics 4 set up on your website.
- An internal search engine (for example: ?q=, ?search=, ?s=, or similar).
- Access to your GA4 account with read permissions.


3. How to Identify the Search Parameter

  1. Go to your website and perform a search.
    For example, search for “python tutorial.”
  2. Look at the resulting URL, for example:

[https://mywebsite.com/search?q=python+tutorial](https://mywebsite.com/search?q=python+tutorial)

In this case, the search parameter is q.


4. Set Up Search Tracking in GA4

  1. Log in to your Google Analytics 4 account.
  2. In the left-hand menu, go to:
    Admin (⚙️) → Data Settings → Site Search Parameters.
  3. Click Add parameter and enter the parameter name (for example: q).
  4. Save your changes.

GA4 will start recording searches automatically from now on.
You won’t see historical data — only searches that occur after setup.


5. View Searches in Reports

  1. In the GA4 main panel, go to:
    Explore → Create a new exploration.
  2. Choose a “Blank exploration” template.
  3. Under Dimensions, add:
  4. search_term
  5. page_location
  6. Under Metrics, add:
  7. event_count (Number of searches)
  8. users (Unique users)
  9. Drag search_term to the rows and event_count to the values.

Now you’ll see the most searched terms by your users 🔍


6. (Optional) Create a Custom Report

If you want to access this data more easily:

  1. In the left menu, go to Reports → Library.
  2. Create a new report and select Event: view_search_results.
  3. Customize the metrics and dimensions (for example: search term, users, pages).
  4. Publish the report so it’s always available.

7. Extra Tips

  • If you use a CMS (like WordPress), the parameter is usually s.
    Example: ?s=python+course
  • Combine this report with conversion data to see which searches drive the most sales or clicks.
  • Export the results to Google Sheets for easier analysis.

DJC > Tutorials