Google Analytics site search categories not showing up
I have setup my site search url to include the cat query param which includes the category to which site search term belongs to. I have also set the param in the view settings -> Enable site search and have put values for both query and category params. My site search url looks like this:
The search terms are appearing correctly in the reports but the categories always show up as not_set. Any, insights will be really appreciated.
Re: Google Analytics site search categories not showing up
In your example above I'm not exactly sure which is which but I'm assuming that the params are broken out like this:
search term = query
category = cat
In that case you should have settings that look like this:
I've only used categories for search refinements, that is, the user is presented with a list of results and then can refine by cat. That is also what the help doc says here:
Search refinements are tracked separately in GA so it's possible that an initial search is required in order for the cat to be applied - but I've never tested this.
It seems like an interesting use case to allow the user to select the cat in advance but as I've said, I've never tested that way.
If you have it configured like my screenshot and your are still getting not set; then I would suggest a using a custom dimension to set the category. This can be easily done in GTM (Google Tag Manager) by using a URL parameter variable and passing into a custom dimension slot that you create in GA.
If you're not familiar with GTM, then you could also have your developers dynamically pass the custom dimension into the GATC (Google Analytics Tracking Code).
More on Custom Dimensions here:
Lastly, if custom dimensions are too much to tackle; you could choose to not exclude these parameters from GA and they will pass to your content reports and you can filter in the UI or dump into excel and do your analysis there.
Hope that helps!