I've been searching for information on how I can expand the internal site search results in Google Analytics. What I want is to link an event of someone filtering a search with what search term they have used.

For example if someone was searching for a type of animal. If they searched for "cat" and they filtered the search term by "feline". I want to know what their search term was, what filters they applied and then how many results it gave.

This would allow me to see if they are think a search term is relevant to a filter category.

Any thoughts on this would be great as I can't seem to find any information on this.


2 Answers 2


This is all possible if you have your developers push all that detail through the dataLayer so that you can capture in into events. On search submit you can get the list of filters used, the search term entered, and on search results you can get the number of results returned. It's a different story if your developers are limited in helping. You would need to scrape for that information on the page which is very impossible but could be tedious.


You can get the filter category quite easily by enabling Site Search Category in the view settings. It'll enable you to use either URL parameters or portions of the URL as the category.

As for the number of results you can push that up via a Custom Metric On the results page you can then push that value up to Google Analytics and query for it accordingly.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.