I have the same problem! All pages (backend and frontend) with this message on the top of pages:
prefix . "bp_profilevisits"; $makecount=false; //echo "
".bp_displayed_user_id()." - ". bp_loggedin_user_id()."
"; if($user_id!=0 and $user_id!= bp_loggedin_user_id()){ if(isset($_SESSION['profile_visit'])){ if(!in_array(bp_displayed_user_id(), $_SESSION['profile_visit'])){ $makecount=true; $_SESSION['profile_visit'][]=$user_id; } }else{ $makecount=true; $_SESSION['profile_visit']=array(); $_SESSION['profile_visit'][]=$user_id; } $sql="select views from $table_name where userid=$user_id"; $view_count = $wpdb->get_var( $sql); $view_count=$view_count?$view_count:0; if($makecount){ if($view_count<1){ $sqli="insert into ".$wpdb->prefix . "bp_profilevisits values(NULL, $user_id, 1)"; $wpdb->query( $sqli); $view_count=1; }else{ $view_count++; $sql="update $table_name set views=$view_count where userid=$user_id"; $wpdb->query($sql); } } } echo"
Total Profile Visits: $view_count
"; } ?>