• Hi,
    I love your plugin, and I have a few questions about functions.

    1. We have a way to create analytics about what our customers search for using the normal search field, but using this plugin doesn’t log the searches. We are currently using the plugin called: Search Analytics by Cornel Raiu to log the searches. Is it possible to log also the searches from your plugin?
    2. Is there a way to add a link to the bottom of the ajax(after the x amounts of products) that would redirect the user to the main search content, and call it something along the line of : See more products

    All the best,
    Bjoern

Viewing 1 replies (of 1 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi,

    Thanks for that idea!

    #1. Please update our plugin to the latest version 1.0.2 then you can you the action hook ‘wpcas_before_search’ or ‘wpcas_after_search’ to track the search keyword, category, and search result.

    #2. You can use the filter hook ‘wpcas_search_result’ to add a link at the bottom of the search result.

    Please try below snippet (How to add custom code?):

    add_filter( 'wpcas_search_result', 'wpcas_custom_search_result', 99, 3 );
    function wpcas_custom_search_result( $result, $keyword, $category ) {
    	return $result . '<div style="padding: 10px; text-align: center"><a href="https://wp.local/?s=' . $keyword . '&post_type=product&product_category=' . $category . '">See more products</a></div>';
    }

    And the result https://www.screencast.com/t/bCgfJkwZEDjJ

Viewing 1 replies (of 1 total)
  • The topic ‘Analytics and see more products’ is closed to new replies.