One of the events automatically tracked through Enhanced Measurements is view_search_results, which represents someone doing a search on your own website.
How do I implement site search?
The main data captured during the search is the search term. Google takes advantage of the fact that a lot of website search systems redirect to a page of search results with the search being a parameter in the URL. This is usually s, q or search_term but you can specify others yourself in your Enhanced Measurement settings.
This means that if your website’s site search doesn’t do this (eg. if it doesn’t show a new page altogether), you will need to implement this event yourself, which may require custom coding and/or Google Tag Manager.
While for many websites, search is just a simple search box, sometimes you need to provide people with more options. At the complex end, many ecommerce websites will have multiple filters for different brands, sizes, features etc. This is useful to track as well, but because this is not automatic, you may need to turn off automatic tracking of site search and implement it manually. In this case, any other fields the user might fill out can be tracked as custom dimensions.
What should I look at in my site search data?
The terms that people are using to search on your website are very valuable, since they represent high intent. If someone’s bothered to visit your website AND to type something in a search box, they are being quite active so it’s important to know if your website matches the need.
Some ideas:
- Just looking at the list of top search terms will give you a qualitative view that you can’t really get by just looking at other GA4 events alone.
- You should also keep an eye on new terms that start to get popular. For example, if you’ve just launched a new feature or have done a redesign, seeing the top terms before and after might help surface some issues.
- If your website is large, you might have more rows than you can meaningfully analyse, in which case you can always export that data and use a machine learning model to classify the searches.
- A more basic check might be to see how many different searches people make after seeing each search term. For queries with a high number, it might mean your actual site search function isn’t giving good results, so they are trying again.
- You can also work out the eventual conversion rate per search term (or even revenue associated with it) to find your most valuable terms. This can help you with developing your products/services.
- Finally if people are searching for something it means they can’t immediately see it. So if you’re seeing terms for pages that are already in your menu, it might be that your menu is a bit cluttered or can use improvement.
