Implements hook_comment_publish().
This actually handles the insert and update of published nodes since $comment->save() calls hook_comment_publish() for all published comments.
function tracker_comment_publish($comment) {
_tracker_add($comment->nid->target_id, $comment->uid->target_id, $comment->changed->value);
}