4

Is there a way to track logged in user activity? I'd like to see who logged in to the site each day and maybe see a specific persons login history.

Currently I have no idea which of the registered users are visiting my site. It's a private family site with ~20 members and I'm just curious to know who is and who isn't using it.

2

As it's a small site, you can do some "real" tracking:

// Update the visit time on *every* request
function wpse32258_update_usertracking(){
    if ( is_user_logged_in() ) {
        $user_ID = get_current_user_id();

        $data = get_user_meta( $user_ID, 'user_tracking' );
        $data[] = current_time( 'timestamp', true );

        update_user_meta( $user_ID, 'user_tracking', $data );
    }
}
add_action( 'init', 'wpse32258_update_usertracking' );

// Output the user visit dates below the footer for admin
function wpse32258_get_usertracking(){
    if ( ! current_user_can( 'manage_options' ) )
        return;

    $data = array();
    foreach ( get_users() as $user ){
        $dates = get_user_meta( $user->ID, 'user_tracking' );
        echo "<h3>{$user->first_name} {$user->last_name}</h3><hr />";
        foreach ( $dates as $date )
            echo "{$date}\n";
        echo '<hr />';
    }
}
add_action( 'shutdown', 'wpse32258_get_usertracking' );
0

I have tried all the plugins listed here, and while some of them were really cool I felt like there were some things lacking.

So recently some friends and I released a plugin called Stream which tracks every change made by logged-in WordPress users.

The plugin is similar to the ones listed here except that every change is organized by user, context, action and IP address to allow for robust filtering/searching.

More information:

  • Answers should be more than plain links. They should actually be an answer instead of a route where someone will maybe find an answer. Please help preventing link rot, edit your answer and provide the needed information that helps the OP as well as later visitors to solve their problem. – kaiser Aug 11 '14 at 14:37
-1

You may try these plugins:

Or you may check this articles about log user activity plugins:

  • Answers should be more than plain links. They should actually be an answer instead of a route where someone will maybe find an answer. Please help preventing link rot, edit your answer and provide the needed information that helps the OP as well as later visitors to solve their problem. – kaiser Aug 11 '14 at 14:37
-1

Yes, there a way to track logged in user activity in wordpress. With help of One WordPress Plugin use can easily track and monitor user's login and activity. I would like you to check this Plugin: https://wordpress.org/plugins/user-activity-log/ I'm sure you would satisfy with it.

  • link only answers are useless. Please edit you answer and expand on how exactly can that plugin be used to answer the question. – Mark Kaplun Sep 20 '16 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.