Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Statistics issue when user presses 'return' › Reply To: Statistics issue when user presses 'return'
October 18, 2021 at 1:43 pm
#35198
Keymaster
Hi,
You are right, those queries should be recorded too. I think there is a bypass solution to it though.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('asp_results', 'asp_add_stat_noajax', 10, 4);
function asp_add_stat_noajax($results, $id, $is_ajax, $args) {
if ( !$is_ajax ) {
asp_statistics::addKeyword($id, $args['s']);
}
}