Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Adding Metrics Link Tracking to Listify via FacetWP

Link tracking is one of the premiere features of Metrics! If you’re using FacetWP with Listify and want to enable Metrics link tracking, you’ll need to locate the listings FacetWP Template added by Listify and add these two lines:

Here’s the code to copy and paste:

// Add these lines BEFORE the existing template code.
do_action( 'searchwp_metrics_click_tracking_start' );
add_action( 'listify_output_results', function() {
do_action( 'searchwp_metrics_click_tracking_stop' );
} );
// The existing Template code should be here.
view raw template.php hosted with ❤ by GitHub

With those lines in place link tracking in Metrics will work as expected!

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP