I use Google Custom Search Engine (a.k.a. Google Programmable Search Engine) on a website. I have added a search box to a page and search results are displayed on another page (the URL of search results page contains the searched term like this: www.example.com/search?q=PRODUCT)

I would like to set up Google Analytics 4 to generate a report of the most frequently searched terms.

Is it possible to configure GA4 to generate such reports automatically (like it was possible with UA)?

1 Answer 1


Set up a programmable search engine

  • Create a Google Programmable Search Engine for your website.

  • Choose a search engine type that displays search results on your own website with a query parameter name embedded in the url (e.g. "?q=").

  • Add the search engine's codes to your site.

Set up Google Analytics 4

  • Create a new GA4 property.

  • Enable "Enhanced measurement" and make sure capturing "Site Search" is turned on.

  • Add GA4 code to your website or add GA4 to your website with Google Tag Manager ( recommended ).

  • From now on, sites searches on your website get recorded by Google Analytics.

See the results

( It may take 24-48h hours to get the results in Google Analytics after the first search. )

  • Open the "Exploration" tab on Google Analytics.

  • Create a new "Free From".

  • Click on the plus sign to create a new "Dimension" and choose "Site Search".

  • Add "Site Search" to the "Rows" panel.

  • Add "Event Count" to the "Values" panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.