   (when (:enabled? (:beeminder user))
     (when-let [goals (seq (db/get-goals db (:beeminder user)))]
       (tracef "goals are %s, getting rows" goals)
-      (let [rows (db/get-pings-by-user (:db db) user)]
+      (let [in-past-week? (past-week-days)
+            rows          (filter #(in-past-week? (:local-day %))
+                                  (db/get-pings-by-user (:db db) user))]
         (doseq [{:keys [goal/name goal/tags]} goals]
           (debugf "Syncing goal: %s with tags %s" name tags)
           (let [{:keys [username token]} (:beeminder user)
                 days                     (days-matching-tag tags rows)
-                existing-datapoints      (datapoints
-                                          (get-in
-                                           user
-                                           [:beeminder :token])
-                                          username
-                                          name)
+                existing-datapoints      (filter
+                                          #(in-past-week? (:daystamp %))
+                                          (datapoints
+                                           (get-in
+                                            user
+                                            [:beeminder :token])
+                                           username
+                                           name))
                 existing-map             (group-by :daystamp existing-datapoints)
                 to-save                  (filter :value
                                                  (for [[daystamp value] days

            [taoensso.timbre :as timbre]
            [clojure.string :as str]
            [clojure.data :refer [diff]]
            [tictag.db :as db]
            [tictag.beeminder-matching :refer [match?]]
            [tictag.riemann :as riemann]))

                   :method :delete
                   :query-params {:auth_token auth-token}})))

(defn past-week-days []
  (set (map db/local-day (take 7 (p/periodic-seq (t/now) (t/days -24))))))

(defn days-matching-tag [tags rows]
  (->> rows
       (filter #(match? tags (:tags %)))
