in ,

How To Track WordPress Site Searches Using Google Analytics (& Why You Should)

Don’t neglect the search box on your site or the results it is spitting out

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.

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 make 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

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.

Site Search Settings

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, it's time to give Google a day or two to actually collect the data.

Then 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.

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 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 and coming back.

Written by Matt

I've been running web hosting servers and building websites for myself using Wordpress for 14 years. My network of sites get a TON of traffic and I use various models to monetize them - mainly display ads and affiliate marketing. Along the way I've picked up hundreds of tips and tricks that I think would be useful for anyone looking to make a website and here is where I'm going to share them. Find me on Twitter too.


Leave a Reply
  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 Reply

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

WordPress Plugins - The Must Have Plugins I Use

Backing Up Both Your Sites and Servers (Updraft & Disk Images)