   '$scope'
   '$routeParams'
   'UserStore'
-  ($scope, $routeParams, UserStore) ->
+  '$intercom'
+  ($scope, $routeParams, UserStore, $intercom) ->
     $scope.highlightId = $routeParams.highlight
     $scope.attendees = _.sortBy(_.values(UserStore.users), (user) -> -user.getScore())
     $intercom.trackEvent('view_table',

          _.forEach($scope.user.events, (e) -> e.generateAllEventStats())
          addLoadingLine("-*- ANALYSIS COMPLETE -*-\nPlease wait...")
          $timeout( ->
            # label = "#{$scope.user.eventIds.length}e#{_.size(UserStore.users)}u"
            # $analytics.eventTrack('analyse',
            #   category: 'interesting'
            #   label: label
            # )
            $location.url('/')
            $scope.user.eventsReady = true
          , 500)

      )
    , (err, events) ->
      $scope.availableEvents = events
      $intercom.trackEvent('events_select_length',
        event_count: events.length
      )
