function matomo_search_get_keys in Matomo Analytics 7.2
Helper function for grabbing search keys. Function is missing in D7.
https://api.drupal.org/api/function/search_get_keys/6
1 call to matomo_search_get_keys()
- matomo_page_alter in ./
matomo.module - Implements hook_page_alter() to insert JavaScript to the appropriate scope/region of the page.
File
- ./
matomo.module, line 563 - Drupal Module: Matomo
Code
function matomo_search_get_keys() {
static $return;
if (!isset($return)) {
// Extract keys as remainder of path
// Note: support old GET format of searches for existing links.
$path = explode('/', $_GET['q'], 3);
$keys = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys'];
$return = count($path) == 3 ? $path[2] : $keys;
}
return $return;
}