Statistics
SearchWP includes a built-in Statistics feature that records all searches performed by your website visitors across any form powered by SearchWP. This powerful analytics tool provides valuable insights into what your users are searching for and how effectively your search implementation is serving their needs.
SearchWP anonymously logs all search queries and captures the following information for each search event:
Search Term Used: The exact keyword or phrase that the user entered into the search form.
Time of Search: A timestamp indicating when the search was performed, allowing you to track search patterns over time.
Engine Used: Which SearchWP engine processed the search request, useful for sites with multiple search configurations.
Number of Results Found: The count of results returned for the search query, helping identify searches that may need optimization.
All recorded search data can be viewed and analyzed in the SearchWP > Statistics page within the plugin’s administrative interface.
Statistics Dashboard
The Statistics page displays a graphical chart showing overall search volume trends over the past month, providing a visual representation of search activity on your site. The interface is organized with engines listed in the left column, while the right side displays detailed search information for the selected engine. This layout allows you to quickly compare search activity across different search configurations.
Below the graphical chart, SearchWP Statistics presents several categories of useful information to help you understand and optimize your search functionality:
No Results Searches: This section displays searches that yielded zero results, making them excellent candidates for adding synonyms or creating new content topics on your site. By identifying queries that return no results, you can discover content gaps and opportunities to better serve your audience’s information needs.
Today: This category shows the most popular searches performed during the current day, giving you real-time insight into what users are actively looking for right now.
This Month: This section displays the most popular searches performed over the past 30 days, helping you identify sustained search trends and frequently requested topics.
This Year: This category shows the most popular searches performed over the past 365 days, providing long-term insight into evergreen content and persistent user interests.
Additional Settings
The statistical data is stored in the wp_searchwp_log table in your WordPress database. To manage database performance, SearchWP provides below key settings:
Auto-delete Log (Older Data):
By default, Statistics retains all historical search data indefinitely, which will gradually increase the size of the searchwp_log table over time. If database storage is a concern, you can enable the auto-delete log option and specify a retention period. This setting automatically removes search records older than the selected timeframe, ensuring that the searchwp_log table does not exceed your database size limits while maintaining recent search history for analysis.
Reset:
The reset option permanently deletes all search data stored in the searchwp_log table, completely emptying it. This action is irreversible, so it should only be used when you want to start fresh with statistics collection or need to clear out problematic data.
Manage Ignored Searches:
Search forms, like all web forms, are vulnerable to spam and bot activity. If you notice spam queries appearing frequently in your statistics, you can exclude specific terms by clicking the × button next to any query in the statistics interface. This prevents SearchWP from displaying that term on the statistics page going forward. The “Manage Ignored” button provides access to a complete list of all ignored queries, allowing you to review your exclusions and restore any terms that were incorrectly marked as spam by clicking to un-ignore them.
Statistics Customization Hooks
SearchWP provides several custom hooks that allow advanced users to control statistics behavior and modify how search data is logged and displayed.
searchwp\statistics\log
This hook allows you to selectively disable logging for specific search terms or prevent statistics recording for certain user roles. For example, you might want to exclude searches performed by administrators or prevent logging of searches containing sensitive information. More Info
searchwp\admin\dashboard_widgets\statistics\days
SearchWP’s Statistics feature includes a Dashboard Widget that provides quick access to search analytics when you log into your WordPress admin area. By default, the Statistics Dashboard Widget displays popular searches from the past 30 days. This hook allows you to customize that timeframe to match your reporting needs. More Info
searchwp\statistics\capability
This hook controls the capability required to view SearchWP’s Statistics and its dashboard widget. It’s useful for restricting access to certain roles, such as allowing only Administrators or Editors to view search data. More Info



