How To Track WordPress Site Searches Using Google Analytics

One of the keys to a successful website is ensuring that you satisfy your visitor’s intent. When someone visits your site, do they come away satisfied or not? Did you answer the question or provide the resources and information that they were looking for?

One way to: (1) check on this metric; and (2) increase your chances of fulfilling it, is to monitor the searches that users are making on your WordPress site.

You’ve probably noticed that your website has a small magnifying glass icon somewhere near the header/logo and not paid much more attention to it than that (on Hostt, the search function is actually located in the footer by the way).

However, you absolutely do need to pay attention and it’s critical that you monitor what searches are being made by visitors to your site.

Why? Because you can then check the results of those search queries yourself and ensure that: (1) you have content that covers their searches sufficiently; (2) if you don’t have the content you can create it; (3) if you do have the content but it isn’t coming up top of the results for the relevant user query, then you might need to change (or introduce) a WordPress search plugin.

The good news is that while WordPress itself doesn’t offer any way to track searches out of the box, you can set it up very quickly and easily using Google Analytics. Here’s what you need to do.

Google Analytics Admin

The admin link can be found in the bottom left of your screen

Click the “Admin” link at the bottom left of your Google Analytics account when you are viewing the stats for the particular website who’s searches you want to track.

View Settings

Click “View Settings”, which should be at the top of the column on the far right.

View settings is on the far right of the page

Site Search Settings

Tick the site search tracking box and then just enter a single “s” in the query parameter field

Scroll down to “Site Search Settings” and then turn on “Site search Tracking”. Then in the “Query parameter” you want to enter a single “s” (without the quotation marks). You can see how it should look above. Just make sure you click “Save” too (down at the bottom).

That’s it!

Accessing Site Search Results

Now that you’ve turned on site search tracking in Google Analytics, give Google a day or two to actually start collecting the data.

Once you’ve waited you can go to the “Site Search” reports, which you’ll find under the “Behaviour” drop down in the main reports area of Analytics for your site.

See what your readers are searching for on your site here

From here you’ll be able to see how many searches are being conducted, what terms are actually being searched for, and under “Search Pages” you can get an idea of how “good” your results pages are.

What Next?

Find the terms that people are searching for the most on your site and first of all, make sure you have some amazing content that is directly related to or answers that query.

Then, make sure that the page(s) with that content are coming up at the top of the results when someone runs the relevant search on your site. If not, then you may want to look at one of the WordPress search plugins that are available. Personally, I have tried several of them and always end up coming back to WordPress’ built-in search function.

You should also ask yourself, for search terms that represent an out-sized number of your total searches, or if the majority of people that come to your site are making searches, what you can do to make that content more easily discoverable by visitors without having to search for it.

For example, can you add it as a menu item or create some other sort of easily identifiable link to that content on your pages?

Follow the simple steps above and you’ll be well on your way to keeping your site visitors more happy, satisfied and coming back for more of your content.

By Sean Robinson

My name is Sean Robinson and I’ve been building and running my own blogs and websites since 2004, and have been doing it full-time for over a decade. If you'd like to know more about my story, please click here.

9 comments

  1. Having used plugins to do this for me, I feel it is best to just use the link and allow the tracking to be done that way. I find that most plugins that offer this end up either missing some numbers, getting them wrong, or just generally aren’t as reliable. If your site is earning you income, it is important to know what people are searching at all times.

  2. Really nice guide, very easy to follow! I’ve been using Google Analytics for years to track searches and many other things such as social media button clicks and scroll depth. There really aren’t any contenders to Google in the analytics scene. Having said that, I am currently trying Matomo as well. The idea of self-hosted analytics is very appealing.

  3. I followed this tutorial a few days back and I’m happy to report that it works great. It’s especially handy because it revealed a few search terms that have no results, something that I can easily fix. I also optimized the no results page to show some suggested articles, that should help with bounces I think.

  4. This is a great idea. I use a plugin for my statistics which can track site searches as well but I’ve never really done anything with the data. I should take another look to see if anything is searched very often so I can make related content stand out better. I do have Google Analytics but I always preferred to stay in the dashboard for everything.

  5. I’m glad you mentioned a search plugin because the default WordPress search results are not very good at all. Have you heard of Relevanssi? It’s so good. The results are sorted much better, fuzzy matching is amazing and it even adds a “did you mean?” suggestion feature. That, along with tracking your searches like this will make you very well equipped.

Leave a comment

Your email address will not be published. Required fields are marked *