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. The 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 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 eitherdoordon’thave.
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.
Still using Universal Analytics and want to view how to set-up site search? You can follow the instructions on an older blog post hereTop Tips And Tricks To Using Google Analytics Better.
In this blog we are going to focus on how to set this up for GA4.
The first important step whether you are setting site search up 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 own website, take a look at the URL, notedown the letters or sequence that appears justbeforethe 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 asbefore 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:
- Login to your GA4 property and click on the gear icon
- Under PROPERTY navigate to DATA STREAMS and select your WEB STREAM DETAILS
- Click the gear icon under ENHANCED MEASUREMENT
- Under the 4thoption down – SITE SEARCH – make sure this is turned on and select SHOW ADVANCED SETTINGS
- In here, add your SEARCH TERM QUERY PARAMETER and click SAVE.
The first 30 seconds of the video will demonstrate this:
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 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!
Confused by GA4? Check out the Glow Analytics Academy for GA4
OurGA4 Training Courseis led by certified GA4 experts who have years of experience working with businesses of all sizes. We’ll teach you everything you need to know about GA4, from setting up your account and tracking your data to creating custom reports and using advanced features.
We’ve developed a schedule of 6 x 3-hour sessions across GTM for GA4, the GA4 Interface, Reports and Insights, and Looker Studio for GA4. By the end of the course, you’ll be able to confidently use GA4 to track and analyze your user data, identify areas for improvement, and make informed decisions to drive business growth.
Interested? We’ll be running courses throughout 2023. Check out ouravailable GA4 Training course dates in Belfast & Dublin.
12 responses to “Setting up Site Search in GA4”
Leave a Reply
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 KearneyBrowse by Category
- Social Media
- SEM
- SEO
- Google Ads
Digital Marketing
- Google Analytics
- Google Tag Manager
- Google Opimize
Digital Analytics
Optimise your website and marketing campaign performance with Ireland’s leading digital analytics agency
Sign up to our newsletterEnjoyed reading this article? Find more like it below…
Posted by
Conor Ross
Jun 9th 2019
Digital Analytics Insights
3 min read
Data Dashboard for Paid Social Campaigns
It can be time-consuming to keep track of all your Paid Social Campaigns, with each campaign running on a different channel or platform. Using Google Data Studio, you can collate...
Posted by
Conor Ross
Jan 25th 2019
Google Optimize
2 min read
Stop & Edit | Latest Features from Google Optimize
Google Optimize is Google’s tool for user experience testing, complete with Analytics and Ads integration, and Data Studio connectors expected in the future. As well as testing on your site,...
Posted by
Georgia Sloan
Oct 31st 2023
Company Updates
2 min read
Get to know Georgia!
Hi, I’m Georgia. I have recently joined the Glowmetrics team as a Digital Analytics Assistant. My journey into this role began with an undergraduate degree in microbiology, which led me...
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
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
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?
Hi Taralee,
Is it that you can’t see any search terms searched in the ‘last 30 minutes’ widget or are you looking for historical data?
If it is the latter, have you followed the 2nd blog to view the site search terms outside the ‘last 30 minutes’ period?
https://glowmetrics.craftandslice.com/blog/5-step-guide-to-view-site-search-terms-in-ga4/
Thanks,
Joanne
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 ?
Hi Rizki,
Have you/any user searched your site after you’ve created the custom dimension? If not, then perform a site search (making sure you haven’t filtered out your IP), then wait a few hours and set-up an exploration report as detailed in step 6 here: https://glowmetrics.craftandslice.com/blog/5-step-guide-to-view-site-search-terms-in-ga4/
Let me know if that works,
Joanne
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
I don’t have the event “view_search_terms” in GA4.
Hi Jessica,
Does your site have a search facility on it? Is Site Search turned on under Enhanced Measurement?
Thanks,
Joanne