November 8, 2022
How to Find Search Terms in Google Analytics 4?
Updated: November 8th, 2022
If your website has a site search feature, you probably want to know what people are looking for. That’s where Google Analytics can help. However, it’s not as simple to see that data as someone would expect.
In this blog post, I will share several options of how and where to find search terms in Google Analytics 4.
Looking for keywords from Google Search?
If you are looking for what keywords people entered in Google Search before landing on your website, this blog post is not about that. GA4 (just like its previous GA versions) cannot show that data anymore (because Google Search does not disclose it).
For Universal Analytics, there was a 3rd party tool available that was able to recover that data partially, but for GA4 (when I am writing this blog post), such a feature is not available.
However, you can connect Google Search Console to GA4 to see search terms (siloed from other data you have).
In this blog post, I focus on search terms that people are entering on your website’s search (if your site has one).
Configure site search in Google Analytics 4
There are several requirements that you need to meet in order to benefit from this blog post:
- You already must have configured site search in Google Analytics 4
- You must wait for at least 24 hours after you configured site search tracking (because GA4 needs more time to start showing the data)
Search terms in standard reports of GA4
If you use the site search tracking of GA4 enhanced measurement, then the name of that search event is view_search_results. You can find that event in several reports. For example, go to Reports > Engagement > Events and look for the view_search_results event.
But this does not tell you much. By looking at the report, you can tell how many people used your search feature, but you cannot tell what they were looking for. So what would you do?
Intuitively, you would probably click the view_search_results event in the report expecting to see more details. Well, that’s just partially true. I’ll explain more in the next chapter of this article.
Search term overview report
When you click on a particular event in the report of the standard events, you will see its overview (some widgets, charts, etc.).
But as I am writing this article, some related default dimensions are not available in the overview of the event, so we need to do some additional customization.
Maybe GA4 will solve this in the future by default, but right now, we will need to create a custom dimension to start seeing the search terms.
Note: before you continue following this article, first check if GA4 hasn’t already solved this problem. When you open the overview of the view_search_results event, keep looking for a widget that says something about the search terms (but NOT search_term in the last 30 minutes).
This is not the widget/report you are looking for. You are looking for a report that shows the data of a longer period of time. If you found it, congratulations. You don’t need to do any additional configuration.
But if you cannot find that, then go to Configure > Custom Definitions.
Click Create custom dimensions and enter the following settings:
- Dimension name means the label of the dimension that you are going to see in the reports. It can be Site Search Term, search_term, or anything else.
- Scope – select Event
- Description. You can leave this field empty. This is a description for internal use.
- Event Parameter – here you must enter exactly search_term (it’s the parameter name that is sent with every view_search_results event)
After you do that, wait for at least 24 hours and then come back to Reports > Engagement > Events > view_search_results. One of the widgets (most likely, at the end of the page) will contain the data of how many times was each search term used by your visitors.
Note: this configuration is not retroactive. That report will be showing data only from the moment you created that custom dimension.
Seeing GA4 search terms in Looker Studio (Google Data Studio)
As I am writing this article, native Google Analytics 4 integration in Looker Studio (a.k.a. Google Data Studio) does not allow you to use the “Search term” dimension in the reports out of the box. Your solution is also to use the custom dimension (that we created in the previous chapter).
So if you need the dimension there, make sure you have followed the previous chapter.
But I guess that eventually, at some point, the Looker Studio integration will be updated and will make that data available by default. So before you try to create a custom dimension, make sure to check if the Search Term dimension isn’t already there.
You can do that by connecting Looker Studio with GA4 and then selecting any chart in the report and in the dimension picker enter “search”. If you see the “Search Term”, then a custom dimension is not needed.
But as you can see in the screenshot below, I am not lucky; therefore, a custom dimension is needed.
Search terms in Google Analytics 4 explorations
If you like to dive deeper into your data, standard GA4 reports are lacking. That’s where explorations become an important tool.
In Google Analytics 4, go to Explore > Free Form
Here you will find 3 columns:
- Tab Settings
- and the actual output of the report.
In the Variables column, click the Plus icon in the Dimensions section and find Search Term (this dimension is available by default, you don’t need a custom dimension for that). Select it and click Apply.
Then drag Search term dimension to the Rows section. Remove any other dimensions that are in the Rows section. Clear any dimensions in the Columns section.
Then, in the Values section, add the Event Count metric (drag it from the Metrics section).
In the Filters section, enter the following condition: Event Name exactly matches view_search_results.
Done! You will now see the report, and if you wish, you can add some additional metrics/dimensions/segments.
Also, you can change the date range in the top-left corner of the exploration.
Find search terms in Google Analytics 4: Final Words
I wish that Google Analytics 4 was more straightforward in this case and would handle the dimensions automatically. This means that I would not need to create a custom dimension for the search_term parameter in order to see it in the Looker Studio or standard reports.
I am really hopeful that in the future, this will be fixed (because now Search Term is available by default in explorations. It wasn’t in the past. So maybe the same thing will happen to Looker Studio and standard reports).