Setting up Site Search in GA4 | GlowMetrics

Mar 19th 2021

Google Analytics

3 min read

Posted by Joanne Kearney

Setting up Site Search in GA4

When talking about site search reporting in Google Analytics I always refer back to the client we had years ago that had over 5 years of site search data but...

GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link

When talking about site search reporting in Google Analytics I always refer back to the client we had years ago that had over 5 years of site search data but didn’t realise it was being collected. To their surprise, they didn’t sell their top searched item but it was a product that was closely related to what they offer. They researched it further and found they could source it, ship it in and start selling it and have made lots of revenue on it since then.

Knowing what people are searching for when they get to your site is important- visitors that search are normally searching for something that they can’t find on the site and this is generally content or products that you either.

Whether it helps you expand your product range, add additional buttons or content to your site, or rename part of your navigation menu to better help people find what they need- site search is one of the less talked about reports in Google Analytics but one that can easily provide you with quick-win actionable insights.

How to Set Up Site Search in GA4

The first important step whether you are setting site search for Universal Analytics or GA4 is identifying what your search query parameter is.

Not sure what your site search query parameter is? To get the query parameter perform a search on your website, take a look at the URL, noting down the letters or sequences that appear in the search term or terms. Then perform another search and check the URL again to see if the same letters or sequence appears again before your search term. If it does and this is a common pattern, then you can take this as your search query parameter.

For example, in the case of GlowMetrics, when you perform a search on our website you will see before the search term each time so this is our query parameter that Google Analytics can now use to identify that a search has been performed:

Next:

  1. Login to your GA4 property and click on the gear icon
  2. Under PROPERTY navigate to DATA STREAMS and select your WEB STREAM DETAILS
  3. Click the gear icon under ENHANCED MEASUREMENT
  4. Under the 4thoption down – SITE SEARCH – make sure this is turned on and select SHOW ADVANCED SETTINGS
  5. Here, add your SEARCH TERM QUERY PARAMETER and click SAVE.

The first 30 seconds of the video will demonstrate this:

https://www.youtube.com/watch?v=IP3vP_yf9rY

You’ll want to check that this is working when you’ve set it up so go back to your site and perform a search. Then, go back to your real-time reports and under the ‘Event countbyEvent name’ widget, you should see at least 1 event against the event. name:view_search_result:

 

To be sure that your search term has come through- click on theview_search_resultsevent and you should see the event parameterkey search_term, clicking on this, you should see the value (your search term- in this case, I searched for ‘site search’). Note- it might take a few minutes for the key and value to appear as you drill down.

If you can’t see your search/search keyword- make sure you aren’t filtering out your IP!

Want to check your site search data going forward (not just in the last 30 minutes)?

You’ll be able to see this under your ENGAGEMENT reports under EVENTS under the event:view_search_results Our follow-up blog demonstrates how to do this: Exposing site search terms in GA4

 

Happy site search analysing!

Want to Learn More About GA4?

Are you struggling to set up site search or use GA4 in general? If so, leave a comment below or get in touch with us at contact@glowmetrics.com. You can also stay up-to-date by following GlowMetrics on Twitter, and LinkedIn or by subscribing to our newsletter for the latest tips and news in the world of Digital Analytics and Marketing.

Don’t forget to sign up for a free account on our Resource Hub to access a wealth of valuable resources, including exclusive Digital Analytics and Digital Marketing how-to videos and insights across GA4, SEO, PPC and more.


GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link GlowMetrics Social Link

12 responses to “Setting up Site Search in GA4”

  1. Alex says:

    This doesn’t help. If I click the view_search_results link I can only view terms searched in the last 30 minutes. How do I find the history of all search terms?

    I tried to create a report like another blog post suggested (Analysis Hub > Exploration), but I don’t see the search_term option in the list of Dimensions.

    Anyone else find GA4 removed all usability and replaced it with less data and more confusion?!

    • Hi Alex,

      To view the search terms retrospectively (not just in real-time) you have to create the event as a custom dimension first under CONFIGURE (on the LHS menu), then Custom definitions > Create custom dimension > under Event parameter > select search_term. This will allow you to then select and use the search_term dimension in reports (Analysis Hub > Exploration).

      I’ll do another blog on this (with screenshots) this week but hopefully this helps in the meantime.

      Joanne

  2. Anthony says:

    I also don’t see the dimension “search_term” when creating the report. What’s the issue?

    • Hi Anthony,

      To view the search terms retrospectively (not just in real-time) you have to create the event as a custom dimension first under CONFIGURE (on the LHS menu), then Custom definitions > Create custom dimension > under Event parameter > select search_term. This will allow you to then select and use the search_term dimension in reports (Analysis Hub > Exploration).

      I’ll do another blog on this (with screenshots) this week but hopefully this helps in the meantime.

      Joanne

  3. Taralee Alcock says:

    I have tried this and while your instructions are very clear, I can’t seem to get it to work. Do you have any suggestions about what else I could try?

  4. Rizki says:

    Hi Joanne, thanks for the article.
    I want to make sure. I have created custom dimention for search_term , but it doesnt show any value :(. Is there a delay time for google to collect it ?

  5. Aimee Turner says:

    In UA you can view the search queries by navigating to Acquisition > Google Ads > Keywords or Search Queries. Another path is Campaigns > Paid Keywords.

    How does this data get set-up in GA4?

    • Hi Aimee,

      Assuming that you’ve set-up the Site Search Query parameter (search_term) as a custom dimension you’d go to:
      Reports > Engagement > Events > view_search_results > Site Search Query (card).

      If you want this to be a permanent feature so the report is more easily accessed, edit the LIBRARY then
      Create a new report > Pull together the dimension for Site Search Query and the Metric Event Count > Save > Add to report collection.

      This table showing site search queries by events (searches) will then appear on the left hand nav as a report that can be easily accessed.

      Thanks,

      Joanne

  6. Jessica says:

    I don’t have the event “view_search_terms” in GA4.

Leave a Reply

Your email address will not be published. Required fields are marked *

GlowMetrics

Posted by
Joanne Kearney

Joanne has over 10 years’ experience working in digital analytics, executing and managing many large scale projects across the UK and Ireland. Joanne is also an experienced trainer, having developed many customised corporate training schemes and regularly speaks at digital and analytics events.
Read more from Joanne Kearney

Browse by Category



GlowMetrics
Optimise your website and marketing campaign performance with Ireland’s leading digital analytics agency
Sign up to our newsletter