WordPress.org

Ready to get started?Download WordPress

Forums

StatComm (StatPress Community) Multisite Edition
[Plugin: StatComm (StatPress Community)] Feature - custom hook for logging ajax request (4 posts)

  1. biswajeet
    Member
    Posted 2 years ago #

    Hi, Will it be possible to have hook designed to call statcommAppend() method on ajax request for capturing ajax events? Also I would like to know the purpose of this hook - do_action('statcomm_info',$scu);

    thanks.

    http://wordpress.org/extend/plugins/statpress-community-formerly-statcomm/

  2. WPReady
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. biswajeet
    Member
    Posted 2 years ago #

    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...

  4. WPReady
    Member
    Plugin Author

    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.