Knowing what your users are searching for can be extremely useful and important. In this members-only tutorial we’re going to look at how to create a simple search logging plugin that will record every search query performed on your site. We will be using the WP_Logging class that I released a week or two ago as the main backbone to the plugin.
The complete code written in the tutorial is shown below. Note! I have also built a more complete version, including admin page, that is available for download at the bottom of the page.