• Okay…..so I started to title this WP-Stats Question, but I wasnt sure if i should…

    What i was wondering…Is there a plugin that keeps track of the users who have visited & posted, by name….for the day…

    Example: WP-stats keeps track of what users are online, and logs the username as “Members/Guests/Bots” . It classifies people who have commented before *by their IP* as Members…

    What i would like to do is keep track of this and plug it in under those who have commented as
    “Today’s Visitors”….because there are some people who comment regularly, and VISITED on a certain day, but didnt COMMENT on that day…….

    I hope this makes sense……:)

    I noticed in the DB that wp-stats deletes users after they navigate away from the site….I just wish it could keep them so that I can query them by day…..

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter courtneyelizabeth

    (@courtneyelizabeth)

    any thoughts?

    Thread Starter courtneyelizabeth

    (@courtneyelizabeth)

    Okay, I’m gonna try to tackle this…hopefully i can get some help…

    I’m using the useronline.php Plugin.

    And i tweaked the code so that…when it enters the user into the wp_useronline table, it also enters them into an identical table called wp_usertoday.

    [BLOCKQUOTE]
    $update_user = $wpdb->query(“UPDATE $wpdb->useronline SET timestamp = ‘$timestamp’, ip = ‘”.get_IP().”‘, location = ‘”.addslashes($make_page).”‘, url = ‘”.$_SERVER[‘REQUEST_URI’].”‘ $where”);
    // If No User Insert It
    if(!$update_user) {
    $insert_user = $wpdb->query(“INSERT INTO $wpdb->useronline VALUES (‘$timestamp’, ‘$memberonline’, ‘”.get_IP().”‘, ‘”.addslashes($make_page).”‘, ‘”.$_SERVER[‘REQUEST_URI’].”‘)”);
    $online_today = $wpdb->query(“INSERT INTO $wpdb->usertoday VALUES (‘$timestamp’, ‘$memberonline’, ‘”.get_IP().”‘, ‘”.addslashes($make_page).”‘, ‘”.$_SERVER[‘REQUEST_URI’].”‘)”);
    }
    $delete_users = $wpdb->query(“DELETE FROM $wpdb->useronline WHERE timestamp < $timeout”);

    $useronline = $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->useronline”);
    if($useronline > 1) {
    echo “<b>$useronline</b> $users Online”;
    } else {
    echo “<b>$useronline</b> $user Online”;
    }
    [/BLOCKQUOTE]

    Thread Starter courtneyelizabeth

    (@courtneyelizabeth)

    My question is:

    What query should i use to get the users for the day – making sure that it ONLY pulls users that came online THAT DAY?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Today’s Visitors…’ is closed to new replies.