Skip to content
Sign in

Search Analytics for WP – Site Search Tracking

See what visitors search for on your site and which searches come up empty.

Not scanned yet WordPress plugin 3k installs

Install in

No install steps yet

Follow the steps on the source page.

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 your search log tells you

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.

Key features

  • Records searches from your normal WordPress search, including theme search boxes and the WooCommerce product search.
  • Also covers wpForo forum searches and custom URL parameters you add, such as Toolset’s wpv_post_search, including REST API requests that use them.
  • AJAX live search can be recorded too, with one line of code (see For developers).
  • Every search term in a sortable table, with the number of searches, average results and last search date.
  • Time filters from the last 24 hours to all time, or any date range you pick.
  • A no-results filter that shows only the searches that found nothing.
  • Each term’s history by date or by hour, plus a “No Group” view that lists every search in order.
  • A daily chart compared with the previous period, and a “When people search” chart with the busiest days and times.
  • A dashboard widget with the last 7 days: searches compared with the week before, trending terms, searches with no results and your busiest day and time.
  • CSV export of whatever view you’re on.
  • Keep your own searches out, even after you log out. You can also skip repeat searches, listed IP addresses, very short terms and words you block.
  • Leaves out searches made by bots, and junk searches that contain a link or HTML.
  • Optional country and logged-in user for each search, both off by default.
  • Popular Searches and Latest Searches blocks to show what people search for on your site, with a live preview in the editor. Both are also available as shortcodes.
  • Separate role access for viewing the statistics and changing the settings.
  • Works on multisite, with separate data for each site, and is translation-ready.

Getting started

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.

Privacy

There’s no account to create and no API key. No search data 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).

When you deactivate the plugin, it asks why. Answering is optional, and only an answer you choose to send leaves your site.

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.

For developers

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.

Support

Questions and ideas are welcome in the support forum. If the plugin is useful to you, a review helps other site owners find it.

External services

The plugin connects to outside services for two things only: the country lookup, which is off by default, and the answer to the optional question it asks when you deactivate it. Both are described below.

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.

IP-API (ip-api.com)

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

ip2c.org

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

Feedback when deactivating (wpsearchanalytics.com)

When you click Deactivate on the Plugins screen, the plugin asks why. Nothing is sent unless you pick an answer and click “Send & Deactivate”. Then your answer, any text you typed, the plugin, WordPress and PHP versions and the site language are sent over HTTPS to wpsearchanalytics.com, the plugin’s website. Your site address, your email address and your search data are not sent. Answers are kept for a year and used to decide what to fix and build next.

Terms: https://wpsearchanalytics.com/terms

Privacy policy: https://wpsearchanalytics.com/privacy

Credits

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.

Written by Joobi from the project's own listing. See the source page

historysearchsearch analyticssite searchstatistics
21 Nov 2026
Version 1.6.3 released. Not scanned yet.

1.6.3

Security:

  • The Latest Searches and Popular Searches blocks now always print search terms as plain text. Reported by Santh

1.6.2

Others:

  • A new Extensions page in the Search Analytics menu lists MWT Search Steer, a free plugin by the same author that gives posts search keywords, with buttons to install or activate it. The page is shown to users who can activate plugins
  • When the statistics page lists searches that found nothing, a line points to MWT Search Steer, so those searches can find a post. It links to installing or activating it for users who are allowed to, and each user can dismiss it. It is not shown on sites below WordPress 6.6 or PHP 7.4, which Search Steer needs
  • Deactivating the plugin asks why, in a short optional form. Nothing is sent unless you click “Send & Deactivate”, and the answers about the plugin not working link to the support forum. See External services for what is sent
  • The plugin’s row on the Plugins screen has Docs and Settings links before Deactivate. Settings is only shown to users who can open the settings page

1.6.1

Features:

  • The dashboard widget is redesigned. For the last 7 days it shows the searches, the searches with no results and the unique terms compared with the 7 days before, the last search, a bar per day, the trending terms, the top searches and the top searches with no results. It also shows the busiest day and time of the last 4 weeks
  • The new “When people search” chart on the statistics page shows the searches of the last 4 weeks by day of the week and 4-hour interval. It follows the “Show results dates as UTC” setting
  • New Popular Searches and Latest Searches blocks show the same lists as the [mwtsa_display_search_stats] and [mwtsa_display_latest_searches] shortcodes, with the same settings and a live preview in the editor. Pasted shortcodes and Shortcode blocks can be turned into them. The blocks need WordPress 5.6 or later
  • The shortcodes and blocks can link each term to its search results, with link_terms="true" in the shortcodes and by default in the blocks. Searches opened from those links are only recorded if you turn that on, with count_link_clicks="true" or the setting in the blocks
  • The text above the lists can be left out, with show_label="false" in the shortcodes and a setting in the blocks
  • Searches made by bots are no longer recorded. Crawlers, AI assistants, link previews, monitoring tools and scripts are recognized by their user agent. Searches that contain a link or HTML, or that are longer than 100 characters, are skipped as junk. Both checks are on by default and have a setting

Bugfixes:

  • The time filters, the shortcodes and the dashboard widget failed on SQLite databases, such as the one WordPress Playground uses for the Live Preview
  • The “Your Last Searches” list of the [mwtsa_display_search_stats] shortcode showed the terms the visitor searched most often instead of the latest ones
  • A live search whose requests the plugin records, such as FiboSearch or a custom live search with its parameter listed in the settings, stored a search for every few keystrokes. Successive requests from the same visitor are now merged into one search, and the results page that follows is not counted again

Optimizations:

  • Statistics for the time filters are cached for up to a minute, and old cache entries expire after an hour
  • The [mwtsa_display_search_stats] shortcode only loads the terms it shows, instead of every term searched in the period

Others:

  • After at least a week of use, the statistics and settings pages show a notice asking for a review. It appears once, and you can dismiss it for good
  • The Search Analytics admin menu item uses the plugin’s new icon instead of a generic chart icon
  • The statistics and settings pages have a box with a link to the Search Analytics Pro waitlist on wpsearchanalytics.com. The plugin sends nothing to that site

1.6.0

Structure:

  • Search data is now only removed when the plugin is deleted and the setting is checked, never on deactivation. The setting is now called “Delete all search data and settings when the plugin is deleted”
  • The minimum WordPress version is now 4.7 (1.5.0 already needed it)

Features:

  • The country lookup can use ip2c.org (HTTPS, IPv4 only) instead of ip-api.com. Choose it under “Country lookup service”; ip-api.com stays the default
  • The new mwtsa_process_search_term() function records searches from your own code, such as an AJAX live search, with the same checks as a normal search

Bugfixes:

  • The statistics charts were not loading since 1.5.0
  • The charts and the “By date” view grouped searches by day of the month, merging e.g. 26 August with 26 September. Comparison periods overlapped by a day and the charts showed an extra day
  • On multisite, deactivating the plugin on one site with “Remove plugin tables on deactivate” checked removed the search data of every site in the network. New sites now get their tables reliably, and deleting a site removes its search data
  • A trailing comma in “Exclude search in case it contains certain substring” excluded every search. Matching now also works for non-English text
  • “Last 24 hours”, “Last week” and “Last month” now cover exactly that period instead of starting at midnight
  • Loading the second page of search results or the search feed no longer counts as a new search
  • Terms with leading or repeated spaces, or longer than 100 characters, got a new row on every search
  • The minimum characters setting now counts characters instead of bytes
  • The CSV export headers were wrong in the “No Group” view
  • Saving the settings reset the chart defaults
  • Deleting terms, and the old Dashboard and Settings menu entries, left a half-rendered page instead of redirecting
  • The roles allowed on the settings page could not save it, and the roles allowed on the statistics page could not export
  • The erase confirmation was skipped in translations containing an apostrophe

Security:

  • CSV exports no longer let search terms run as spreadsheet formulas
  • The tracking cookie is validated (a malformed cookie made every request fail) and is now HttpOnly and SameSite
  • Every action now checks the user’s role, including the chart requests and erasing the history

Optimizations:

  • Countries are shown with flag emoji instead of 249 bundled flag images (about 1 MB). Browsers that can’t draw flag emoji, such as Chrome and Edge on Windows, load a small flag font bundled with the plugin
  • Added database indexes to the search history and search terms tables. Database upgrades now run from the admin, never during a visitor’s search
  • The country lookup only runs for recorded searches, is cached per IP for a day and times out after 2 seconds
  • The tracking cookie is no longer re-sent on every page, which kept pages out of full-page caches
  • Searches through the REST API are counted without loading every matching post
  • The plugin’s stylesheet only loads on its own screens

Deprecations:

  • The mwtsa_stats_table_* and mwtsa_term_stats_table_* filters are deprecated. Search Analytics 2.0 replaces the statistics screens and they will no longer run there

1.5.0

  • Structure: Changed the main page from wp-admin/index.php?page=search-analytics%2Fadmin%2Fincludes%2Fclass.stats.php to wp-admin/admin.php?page=mwtsa-search-analytics. A proper redirect was added to the old route
  • Structure: Changed the settings page from wp-admin/options-general.php?page=search-analytics to wp-admin/admin.php?page=mwtsa-search-analytics-settings. A proper redirect was added to the old route
  • Structure: Added a new way to access the plugin main page as a section on the sidebar.
  • Bugfix: Fix a possible crash in case ip-api.com did not return a valid response
  • Bugfix: Fix potential IP spoofing when running a search with save country on
  • Feature: Added mwtsa_run_terms_history_data_query_args filter for changing the args before history data gets queried
  • Feature: Added a link to the statistics page on the dashboard widget
  • Optimization: Security improvements and general code optimization. Fixed Cross-Site Request Forgery (CSRF) vulnerability
  • Optimization: Performance improvements
  • Optimization: Added the select2 and jQuery UI Smoothness theme as assets in the plugin
  • Optimization: Deprecated the global $mwtsa. It will be removed in a later version. Use the MWTSAI() to get the instance
  • Deprecations: Deprecated the helper functions with mwt_ prefix and renamed them to the proper prefix mwtsa_ to prevent possible collisions
  • Deprecations: Deprecated the mwtsa_run_terms_history_data_query filter. It could be used by bad actors to modify the query and pass a not sanitized query through

1.4.16

  • Bugfix: Fix bug related to exclude keywords setting, reported here. Thank you @luislu for the report!

1.4.15

  • Bugfix: Fix country not being saved, reported here. Thank you @mikeeiler for the report!

1.4.14

  • Bugfix: Fix bulk deletion not working.

1.4.13

  • Optimization: Security improvements and general code optimization.

1.4.12

  • Others: Rename plugin to “Search Analytics for WP”

1.4.11

  • Optimization: Security improvements and general code optimization. Fixed Reflected Cross-Site Scripting vulnerability reported by vgo0

1.4.10

  • Optimization: Security improvements and general code optimization. Fixed Broken Access Control vulnerability reported by Abdi Pranata. Thank you for the responsible disclosure!
  • Optimization: Compatibility with WP 6.6.x

1.4.9

  • Bugfix: Fixed warnings showing on specific combination of filters and grouping. Reported here. Thank you @sadesades for the detailed report!

1.4.8

  • Optimization: (ENCORE) Security improvements and general code optimization. Fixed this vulnerability
  • Optimization: adjust some translations

1.4.7

  • Optimization: Security improvements and general code optimization. Fixed this vulnerability

1.4.6

  • Optimization: Security improvements and general code optimization. Fixed this vulnerability
  • Bugfix: Charts not working after changing interval or chart type

1.4.5

  • Bugfix: Fix PHP Compatibility issue: PHP 5.6 – 7.2

1.4.4

  • Bugfix: Date filters not working if the browser is set in a language different from English
  • Feature: Add setting: “Show results dates as UTC”, default: true
  • Feature: Make dates in the results list show as UTC by default.
  • Feature: Add 6 more filters and 2 actions for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Security improvements and general code optimization
  • Optimization: Updates to the settings page
  • Deprecations: Deprecated the mwt_wp_date_format_to_js_datepicker_format() helper function

1.4.3

  • Bugfix: Make sure that shortcode mwtsa_display_latest_searches displays unique terms
  • Feature: Add more parameters to some filters. An overview post will be published here: Search Analytics for WP: Filters Reference

1.4.2 Hotfix

  • Bugfix: fix default filters in the results view

1.4.1

  • Feature: Add shortcode mwtsa_display_latest_searches for displaying the latest searches on the frontend of the website
  • Feature: Add 3 more filters for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Security improvements and general code optimization
  • Others: Add link to the complete changelog

1.4.0

  • Feature: Add REST API search support
  • Feature: Add 9 filters for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Add the search term to the mwtsa_extra_exclude_conditions filter
  • Optimization: Check for minimum PHP and WP versions when activating the plugin
  • Optimization: Compatibility with WP versions up to 6.0.1
  • Optimization: Compatibility with PHP v8.1
  • Optimization: Security improvements and general code optimization
  • Bugfix: Fix styling on WP 4.4.0 – 4.9.20
  • Bugfix: Fix broken settings page URL from the results page
  • Others: Rename the plugin to “WP Search Analytics”

Older versions

The changes in versions 1.0 to 1.3.6 are listed in the full changelog.

2 Mar 2018Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)