WordPress.org

Support

Support » Plugins and Hacks » StatComm (StatPress Community) Multisite Edition » [Plugin: StatComm (StatPress Community)] Feature – custom hook for logging ajax request

[Plugin: StatComm (StatPress Community)] Feature – custom hook for logging ajax request

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPReady

    @wpready

    Hi biswajeet, could you explain what would be its purpose?

    We included a detailed explanation about statcomm_info action on the
    following post: Expanding StatComm

    Let say we want to track custom event, ajax events on the front end generally couldn’t be tracked. Though its possible to write separate code to track these ajax request but It will be nice have all in done by one module. This feature can be extended simply writing a few lines of code, for eg –

    //extending statcommAppend
    function statcommAppend( $ajax_request='' ) {
    ....
    
    if( !empty($ajax_request) ) { ...insert $ajax_request to db }
    }
    
    add_action( 'track_event', 'statcommAppend', 5, 1 );
    
    //later we can call
    do_action( 'track_event', $event );

    This will have a custom do_action call at our disposal to be used on any events we want to track…

    Plugin Author WPReady

    @wpready

    It took us a while to understand the idea. We added the requirement little ahead, since it will be needed when we improve the graphic engine.

    Thanks for your suggestion, very good indeed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: StatComm (StatPress Community)] Feature – custom hook for logging ajax request’ is closed to new replies.
Skip to toolbar