For example, on the website of one of our clients, we encountered that the Site Search was not automatically displayed within Google Analytics 4 reports. And because of this, Google Looker Studio (formerly Google Data Studio) was not including this data either.
Therefore, in this blog, I will explain to you how to enable Site Search in GA4 reporting and how you can then have that data included in Google Looker Studio as well.
After enabling site search within the selected stream, go to Manage > Custom Definitions > Create Custom Dimension. You can find Manage by the cog icon at the bottom of the left menu of Google Analytics.
Fill in the event with the user parameter search_term. The remaining fields may be filled in according to your preference, but we recommend the following:
Now it's a matter of importing this data into Looker Studio as well. Go to Looker Studio and then choose your relevant dataset. Make sure you can edit the report and not just view it, otherwise you won't be able to make adjustments. Then click Source > Manage added data sources.
Find the Google Analytics 4 data source and then select edit. After this, select "Edit Connection.
We now need to reconnect to the Google Analytics data source. Indeed, after this, the added field of the custom dimension in Google Analytics will also be included in your data list.
Then confirm that a new field should be added in Looker Studio by pressing Apply.
Now add the Site Search Query to the Dimension and Statistics fields. And voila, you now have site search enabled in GA4 AND included in Looker Studio. Nice going!
2 Responses to "Tutorial: Showing Site Search in Google Looker studio"
Can you help me? I can add the 'site search query' as a table, but the data keeps showing '(not set)' with the number 1 in a column after it, while in GA4 I can see the entered data in the real-time data. It looks like the data is coming through, but it is purely counting up how many times the search function has been used?
Hi Ruben,
Have you changed the date in LookerStudio to the period after setting up site search? If this does not work, try 'Number of events' instead of the 'site search query' in statistics.