Search Statistics

This topic contains 2 replies, has 2 voices, and was last updated by frankdm frankdm 6 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8750
    frankdm
    frankdm
    Participant

    Hello,

    I was wondering if there is anyway to change the search statistics behavior.

    Currently it remembers the last 20 searches. Is there a way to look back further? (a log or something) If not, is there a way to increase this to the last 50 searches or so? It is just that 20 searches are done so fast that it is hard to keep track of what people are interested in.

    Thanks!

    • This topic was modified 6 years, 1 month ago by frankdm frankdm.
    #8774
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    This section of the plugin is currently under re-construction, because it’s outdated.

    As a temporary solution, you can make direct modifications to the \wp-content\plugins\ajax-search-pro\backend\statistics.php file. On lines 48-49, you should see this:

    $top20 = isset($_POST['searchform']) ? asp_statistics::getTop(20, $_POST['searchform']) : asp_statistics::getTop(20);
    $last20 = isset($_POST['searchform']) ? asp_statistics::getLast(20, $_POST['searchform']) : asp_statistics::getLast(20);

    You can change the limit of 20 to a higher number, like so:

    
    $top20 = isset($_POST['searchform']) ? asp_statistics::getTop(40, $_POST['searchform']) : asp_statistics::getTop(40);
    $last20 = isset($_POST['searchform']) ? asp_statistics::getLast(40, $_POST['searchform']) : asp_statistics::getLast(40);

    Although I’m not sure how much can the graph safely display 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #8778
    frankdm
    frankdm
    Participant
    You cannot access this content.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.