Support » Plugin: Dave's WordPress Live Search » [Plugin: Dave's WordPress Live Search] How to record users search terms?

  • Hi there, great plugin thanks.

    I was wanting a way to see what users are searching, are you thinking of adding this as a feature to your plugin to record them in the dashboard?

    I installed Search Meter so I could for now, but it only records the results if people use the input, and not the ajax results.

    If they select a result from the live search, it is not recorded.

    Thanks for your time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dave Ross


    I looked at the Search Meter source code, and I might be able to make it work with Dave’s WordPress Live Search. The biggest obstacle is the author’s use of the “the_post” action. Since I’m not actually rendering posts like a theme’s search.php template, this never gets called. I’d have to find a way to trigger this function without adding too much time or complexity to my search process

    The ideal solution would be for bennettmcelwee to add a way to trigger a save in his plugin without going through the_post(), much like was done with Relevanssi.

    Thanks for your reply Dave.

    If you haven’t already contacted bennettmcelwee to discuss how to get them to work together, I have started a forum post here:

    Cheers, Ian

    I’ll have a look at Dave’s plugin and see how I can get Search Meter to work with it.

    Thanks bennettmcelwee 🙂

    Well, it looks to me as if it should work. Dave’s plugin calls $wpQueryResults->query, which calls $wpQueryResults->get_posts, which calls the the_posts filter, which should trigger Search Meter.

    What am I missing? Dave?

    If it is somehow not being called, perhaps you should call
    $wpQueryResults->posts = apply_filters('the_posts', $wpQueryResults->posts);
    before using the query results anyway.

    Note that there is a general ambiguity generally in logging live search results: should intermediate searches be logged? If I type “bug” and get a bunch of posts about insects, but then continue to type “le” and end up with posts about bugles, should the “bug” searches be recorded? Currently they owuld be.

    Hmm good question, I suggest just recording the final keys entered before the mouse was clicked as it should be closer the the end result the user was searching for.

    What would be really great is if the plugin could search the text inside PDF files added to blog as well and display those results.
    Am planning on adding lots of PDFs instead of content, but the default search does not do this.

    Thanks heaps for your time guys 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Dave's WordPress Live Search] How to record users search terms?’ is closed to new replies.