

Search statistics with time, results and grouping filters
Search Analytics for WP logs what visitors search for on your WordPress site and how many results each search returned. You see which search terms are popular and which came up empty. Everything is stored in your own database.
Your site search shows what people came for, in their words rather than yours. Say “opening hours” got 41 searches last month and zero results every time. Either the page is missing or it says “business hours”. The no-results filter lists every gap like that.
What to write next. Searches with no results are topics people expect to find on your site. Sorted by number of searches, they become a to-do list with the most requested topics on top. On a blog, that’s your next post. In a help center, it’s the answer people keep missing.
Which pages people can’t find. Sometimes the page exists and visitors still search for it. If “contact” or “shipping” shows up week after week, the link is probably too hard to spot.
In a WooCommerce shop, every product search is saved with the number of products it found. A run of searches for a brand or size you don’t carry is demand you’d otherwise never hear about.
Often the lesson is simply vocabulary. Visitors type “couch” when your store says “sofa”. Their search terms are the words to use in your titles and menus.
wpv_post_search, including REST API requests that use them.Recording starts as soon as you activate the plugin. Run a search on your site, then open Search Analytics in the admin menu to see it.
One setting is worth changing on day one: exclude your own role, so your test searches don’t count. The FAQ below covers the rest, from WooCommerce to live search.
There’s no account to create and no API key. Nothing is sent anywhere unless you turn on “Save Search Country”, which is off by default. It sends visitors’ IP addresses to ip-api.com or ip2c.org to look up the country (see External services below).
IP addresses are never saved with the searches, and no cookies are set unless you use one of two optional settings. The FAQ lists exactly what is stored.
To record searches from your own code, such as an AJAX live search, call mwtsa_process_search_term( $term, $result_count ). It runs the same exclusion checks as a normal search and returns whether the search was saved.
Filters: mwtsa_do_not_save_search, mwtsa_exclude_term, mwtsa_extra_exclude_conditions, mwtsa_result_count, mwtsa_export_filename, mwtsa_term_search_link, mwtsa_is_bot, mwtsa_is_junk_term, mwtsa_live_search_merge_seconds, plus filters on the shortcode output, which apply to the blocks too. Actions: mwtsa_after_term_save, mwtsa_after_history_term_save. The code is on GitHub.
Questions and ideas are welcome in the support forum. If the plugin is useful to you, a review helps other site owners find it.
Search Analytics for WP can look up the country each search was made from. This only happens when the “Save Search Country” setting is enabled; it is off by default.
When a search is recorded, the visitor’s IP address is sent to the service chosen in the “Country lookup service” setting. Each IP address is looked up at most once per day, and private or reserved addresses are never sent.
The default service. The IP address is sent over HTTP, as the free service does not support HTTPS. The free service only allows non-commercial use and 45 requests per minute.
Terms of service and privacy policy: https://ip-api.com/docs/legal
The IP address is sent over HTTPS. The service is free (LGPL) and allows around 10 requests per second. It only supports IPv4 addresses, so searches from IPv6 addresses are saved without a country.
Service terms and privacy policy: https://about.ip2c.org
Country flags on Windows use the “Twemoji Country Flags” font from country-flag-emoji-polyfill by TalkJS (MIT license). The flag artwork comes from Twemoji and is licensed under CC-BY 4.0. The font and polyfill are bundled with the plugin and loaded from your own site.