Only that slider did move. Where the slider is, what to look out for and thus how to set up Site Search with Google Analytics I will show you in this article.
When you want to make search queries measurable with Google Analytics 4, it is of course important that you first have Google Analytics 4 and have linked it to your website.
How to do that, I'm not going to explain to you in this article. After all, that's a full article in itself.
Of course, I've written that one a long time ago. In the following article you will find exactly how to create Google Analytics 4 and then link it with Google Tag Manager.
Tutorial: loading Google Analytics 4 via Tag Manager.
Do you have a search function within your website?
Probably so.
But do you know if that feature is used often and what exactly people fill out?
My guess is no.
If not, you are currently missing a lot of opportunities.
For example, did you know that you can use this as inspiration for your findability and optimization of your website?
Because when people fill in a word often, it's something they want to see/find quickly.
So you can use that information nicely to make your website even better for your visitors (and Google!).
High time, then, to tell you all about how to set up this gold mine.
Step 1: Go to the Google Analytics website and then go to the appropriate Google Analytics 4 property.
Step 2: Click on "Manage" at the bottom left.
Step 3: Click on "Data Streams.
Step 4: Click on the appropriate data stream.
Step 5: Click the cog icon in the "Enhanced Measurement" box.
Step 6: Turn on the "Search the site" slider.
It's that easy to turn on Site Search within Google Analytics 4. Unfortunately, you're not there yet. There are two more things to do.
I want you to go to the search function of your website right now and type something in there. If you type something in and then click enter. What URL will you see?
The URL within my WordPress website becomes https://onlinemarketingagency.com/?s=test.
The letter or letters after the ? in your URL are called the query parameter. That one is very important.
In fact, Google Analytics 4 has some default of those parameters, but if you have a non-standard CMS, Analytics 4 may therefore not recognize your parameters.
If you click on "Show Advanced Settings" in the image above, you will see that Google Analytics 4 has the following parameters by default:
Is the letter or letters after the ? in your URL not listed? Then put a comma after the keyword and complete it with your parameter.
This will look like this: q,s,search,query,keyword,sitesearch
The very last steps are checking that it works and finding out what people enter in the search function.
To do this, of course, you must first use the search function on your website. Once you have done that, you need to go to the "Realtime" heading within Google Analytics 4.
Then on the right you will see a block with 'Number of events'. You should see your 'view_search_results' there.
Now that you know it works, you also want to know people have entered it in your website's search function.
Unfortunately, Google Analytics 4 does not yet track all searches neatly. Currently, only search results from the past 30 minutes are tracked.
You can find these out by clicking on "Events" on the left under the heading "Engagement.
Then click on your 'view_search_results' in the list of events.
And then set the parameter name on the right to 'search_term'.
If you also want the search terms to be visible in your Google Analytics 4 reports, you need to perform an additional step. Fortunately, we've already written a blog about this, so you don't have to figure this out yourself.
Getting Google search terms insight into your Google Analytics 4 reports
When you go through steps 1 and 2 of the blog in the link above, you'll be all set to get your search terms visible in your reports as well!
Since I think you'll want more helpful tips and tutorials on Google Analytics 4, I've listed them all here for you.
Site Search in Google Analytics 4 (GA4) is designed with a different interface and has different settings compared to the older versions. GA4 puts more emphasis on event-driven data and real-time reporting, and this also affects how Site Search is presented and analyzed in the platform. The specific process to set up Site Search has also changed in GA4, as described in the blog.
There is no explicit limit mentioned for the number of search terms GA4 can track. However, as the blog mentions, GA4 currently only tracks search results from the past 30 minutes, which may be a limitation for some users.
There is no standard process to migrate data directly from older versions of Google Analytics to GA4, mainly because GA4 uses a completely new measurement system and data structure. However, both versions can run simultaneously on a Web site, allowing users to compare and analyze data from both sources.
No, the Site Search feature in GA4 is free to use. However, if you use advanced features or process a large volume of data with Google Analytics, there is a cost for Google Analytics 360, the paid version of the platform.
2 Responses to "Tutorial: Setting up Site Search in Google Analytics 4"
Hello Daniel
I followed your steps only this is about the last 30 minutes. Now how do I see a report on my own chosen time frame.
In addition, I have excluded myself from the statistics and that test will not work. It does if you go incognito.
Hi Sandra,
True! Currently, Google only shows the last 30 minutes. Should you want to test this, it's best to do it on your phone via 4G. Then you will have a different IP address.