Mobile app version of vmapp.org
Login or Join
Tiffany637

: Identify Google Analytics site search categories My search returns results at the following URLs: (for a single search term) search/keyword/ (for a filtered search using the same term) search/?sections=articles&keywords=k

@Tiffany637

Posted in: #GoogleAnalytics #Search

My search returns results at the following URLs:

(for a single search term)

search/keyword/


(for a filtered search using the same term)

search/?sections=articles&keywords=keyword


In GA, I have:


Query parameter = search/
Category parameter = sections, keywords


However in the reports the site search category is coming back as '(not set)' even after a fortnight of use.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

3 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

To build on the point that @MagicDude4Eva made, you can follow this guide (particularly section 1) in order to get the site search metrics working fine based on your current URL structure. It requires Google Tag Manager to work however you could use the same JavaScript to do this manually if you have code access to the site.

The reason you are getting sessions with / without search data is due to the fact that GA recognizes based on your setup that something was searched, however without a URL parameter it cannot see what was searched. Therefore it'll count a search session but no categorization.

10% popularity Vote Up Vote Down


 

@Eichhorn148

You can always use GA to provide a virtual path when your search is executed:

ga('send', 'pageview', '/search?query=mysearchterms&category=mycategory');


Just make sure that the search terms/category are both URL encoded. You can then use those params in the setup of the site-search.

10% popularity Vote Up Vote Down


 

@Heady270

GA site search requires a query parameter in your URLs to base site search requests off of, for example search?keyword=mySearchTerm. In this example you would enter 'keyword' into the site search configuration.

If your search results page doesn't have a query parameter, then you may need modify your page URL to include it. More information can be found here.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme