 Backbone = require 'backbone'
 CurrentUser = require '../models/current_user.coffee'
 FollowProfile = require '../models/follow_profile.coffee'
-analytics = require '../lib/analytics.coffee'
+analyticsHooks = require '../lib/analytics_hooks.coffee'
 
 #
 # FollowProfiles

    @add followProfile

  unfollow: (profileId, options={}) ->
    analytics.track.click "Unfollow profile"
    error = options.error
    options.error = (model, response, options) =>
      @add model

    @syncFollows _.rest(profileIds, @maxSyncSize)

  follow: (profileId, options={}) ->
    analyticsHooks.trigger 'followable:followed', message: "Follow profile"

    error = options.error
    options.error = (model, response, options) =>
      @remove model
