     @rtm.ready =>
       unless @workspaceData.channelId
         @statusBar.emit 'CollaborationEnded'
+        @collectButtonShownMetric()
 
       @fetchSocialChannel (err, channel) =>
         if err or not channel
           @statusBar.emit 'CollaborationEnded'
+          @collectButtonShownMetric()
           throwError err  if err
           return
 

            @startChatSession => @chat.showChatPane()
            @chat.hide()
            @statusBar.emit 'CollaborationStarted'


  startCollaborationSession: (callback) ->

    @ready =>
      @statusBar.handleCollaborationLoading()
      @statusBar.share.show()


  collectButtonShownMetric: ->

    IDEMetrics.collect 'StatusBar.collaboration_button', 'shown'


  prepareCollaboration: ->
