• I am looking to add a Google Analytics event tracking script that is triggered when a person clicks the search button. Is there a place I can add the code snippet?

Viewing 1 replies (of 1 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    There’s no build in way to do this.

    It’s possible, but you have to be comfortable with code. Load a custom JS file with wp_enqueue_script from the functions.php inside your active theme folder.

    In the custom JS script include this.

    
    jQuery( document ).ready( function( $ ) { 
      $( "#wpsl-search-btn" ).bind( "click", function( e ) {
     // run your custom code.
      });

    });

    This is untested, but it should work.

Viewing 1 replies (of 1 total)

The topic ‘Analytics Event Tracking’ is closed to new replies.