     {tags} = metadata
     guides = metadata.collections.guide ? []
 
-    addPageViews files, null, ->
-      addApiFiles files, metalsmith, opts, done
+    addPageViews files, null, (err) ->
+      if err? then return done()
+      addApiFiles files, metalsmith, opts, -> done()
 


  authClient.authorize (err, tokens) ->
    # Bail on any errors
    if err? then return throw err

    analytics.data.ga.get
      auth: authClient

    callback = opts
    opts = {}

  queryAnalytics null, (err, rows) ->
    if err?
      console.log "[Warning] Google Authorization Failed!"
      console.log "[Warning] Auth Debug:", arguments
      return callback err, rows

    # Convery rows to an object (key/value) for easy lookup
    pageViews = {}
    for row in rows
