diff --git a/flag_tracker.module b/flag_tracker.module
index f176c5c..faea334 100644
--- a/flag_tracker.module
+++ b/flag_tracker.module
@@ -162,3 +162,58 @@ function flag_tracker_theme_registry_alter(&$theme_registry) {
     $theme_registry['flag']['path'] = drupal_get_path('module', 'flag_tracker') . '/theme';
   }
 }
+
+/**
+ * Implements hook_node_insert().
+ *
+ * Adds new tracking information for this node since it's new.
+ */
+function flag_tracker_node_insert($node, $arg = 0) {
+  _flag_tracker_add($node->nid, $node->uid);
+}
+
+/**
+ * Implements hook_node_update().
+ *
+ * Adds tracking information for this node since it's been updated. We only
+ * want to flag the owner of the node if it's different than the previous
+ * revision, or less it's impossible for users to unfollow a post they author
+ * since we would keep re-flagging it every time someone else edits that node.
+ */
+function flag_tracker_node_update($node, $arg = 0) {
+  if ($node->uid != $node->original->uid) {
+    _flag_tracker_add($node->nid, $node->uid);
+  }
+}
+
+/**
+ * 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 flag_tracker_comment_publish($comment) {
+  _flag_tracker_add($comment->nid, $comment->uid);
+}
+
+/**
+ * Flag a given node for a user based on tracker changes.
+ *
+ * @param integer $nid
+ *   The node ID for the content to be tracked.
+ * @param integer $uid
+ *   The user ID for the user who wants to do the tracking.
+ */
+function _flag_tracker_add($nid, $uid) {
+  $node = node_load($nid);
+  $tracker_flag = flag_tracker_get_tracker_flag($node->type);
+  if (!empty($tracker_flag)) {
+    $flag = flag_get_flag($tracker_flag);    
+    if (in_array($node->type, $flag->types)) {
+      // Make sure it's not already flagged.
+      if (!$flag->is_flagged($nid, $uid)) {
+        $flag->flag('flag', $nid, user_load($uid));
+      }
+    }
+  }
+}
