Knowing what your customers and prospects are searching for across your site can be quite instructive in figuring out what pages need to be improved, what people are searching for and not finding across your website or you may even want to create segments out of those users who used certain terms. Luckily google has made it pretty easy to set up site search tracking within google analytics so continue reading to find out how!
1. Verify whether or not you are already tracking searches :)
Often times when we at Sense Data Lab go in to consult with businesses we find it comes as a surprise that they are already tracking site search, they are usually unaware of how to find the data within google analytics. To verify if you are already tracking site search or not you can navigate to Behaviour > Site Search > Search Term
2. Verify your site search query parameter
In order for google analytics to determine what part of the url constitutes a search we need to give it the search query parameter. You can find this parameter by conducting a search on your website and looking for the character before the equals sign and search term. Suppose our search url looks like this /searchresults.php?q=sensedatalab&service=tagmanagement we can see the search parameter here is "q" and the category is "service".
3. Turn on site search in Google Analytics admin
Next thing we need to do is turn on site search tracking within the Google Analytics admin section. You can find this under view settings, if you then scroll to the bottom of the page you will see that there is a slider button which you will need to switch to on.
Following this you will need to input your search query parameter. In our example above it happens to be the letter "q" so thats what we will enter.
Underneath you will have the option to strip the query parameters from the url. It is recommended you turn that on as you will be able to see the searches within your search term report and thus it becomes unnecessary to track searches within the url. Note you could also look to track the search category which in our example would be "services", if you would like to track this as well repeat the above with the category parameter.
Now you just have to click save. You just enabled search tracking across your site! Please note that this will not backfill any search data rather it will collect searches from that point forward.
Some websites track searches in different ways which require either a filter to be setup or for you to track this via the datalayer using tag manager. Contact us today if you need help with this!