Skip to:
Content
Pages
Categories
Search
Top
Bottom

Obtaining useful community metrics?


  • adamt19
    Participant

    @adamt19

    I’d like to build an admin page which uses custom queries to provide real-time access to the following metrics:

    • Messages sent
    • Messages sent that are replies
    • Avg number of connections per user (in our case, or ‘Favorites’ per BP FOllow plugin, not friendships)
    • Avg time between account creation and deletion
    • # of account deletions to-date
    • User login frequency per-week
    • Avg profile views per session

    xprofile field-specific metrics based on our network such as:

    • # of Males signed up
    • # of Females signed up
    • Age breakdown 18-24, and every segment 5 years at a time beyond this
    • more..

    I haven’t decided on an admin-area dashboard or ‘generate report’ script, but I have some questions about a few of these before I get started:

    With profile deletion, does anything remain which could be used to measure time between creation, deletion, etc?

    I know about last activity but has anyone extended this to measure frequency?

    Of course, will be updating thread with progress.. but any suggestions from those of you who have worked on similar internal tools would be GREATLY appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)

  • adamt19
    Participant

    @adamt19

    Here are the easiest ones which I’ve implemented so far.

    $msg_threads_total = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages', OBJECT ));
      
      $msg_threads_today = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(NOW()) = DATE(date_sent)', OBJECT ));
      
      $msg_threads_yesterday = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) = DATE(date_sent)', OBJECT ));
      
      $msg_threads_week = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 7 DAY)) <= DATE(date_sent)', OBJECT ));
    
      
      $msg_sent_total = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages', OBJECT ));
      
      $msg_sent_today = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(NOW()) = DATE(date_sent)', OBJECT ));
      
      $msg_sent_yesterday = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) = DATE(date_sent)', OBJECT ));
      
      $msg_sent_week = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 7 DAY)) <= DATE(date_sent)', OBJECT ));

    adamt19
    Participant

    @adamt19

    If you’re using the BP-Follow plugin as we are, here’s total follows:

    $follows_total = count($wpdb->get_results( 'SELECT * FROM wp_bp_follow', OBJECT ));


    adamt19
    Participant

    @adamt19

    I’d love to be able to isolate ‘Mutual Follows’ from ‘Total Follows’, i.e.:

    if useridA is following useridB AND useridB is following useridA


    alien1
    Participant

    @alien1

    Hi @adamt19

    excelente ideia .

    I have few knowledge of programming. Can you help me how to implement this on my buddy press installation?

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Obtaining useful community metrics?’ is closed to new replies.
Skip to toolbar