If you're interested in finding out how people are using your site's search field, here's an easy way to store their queries in your Dashboard logs, like so:
We'll be working with the search block's controller to create a new log entry. First, copy (your site root)/concrete/blocks/search/controller.php to (your site root)/blocks/search/controller.php and open up the new override copy in your text editor.
Then find the do_search function:
function do_search() {
$q = $_REQUEST['query'];
Add another line to log the query. Including the second argument here grabs just the search query:
function do_search() {
$q = $_REQUEST['query'];
Log::addEntry($q,'search_term');
Loading Conversation