     abortDownload: -> {}
     fileDownloaded: -> {}
 
+  coreGlobalActions: ->
+    logout: -> {}
+    fileAborted: (uploadData={}) -> {fileSize: uploadData.fileSize}
+    fileUploaded: (uploadData={}) -> {fileSize: uploadData.fileSize}
+    sendDraftError: (dId, msg) -> {drafLocalId: dId, error: msg}
+    sendDraftSuccess: ({draftLocalId}) -> {draftLocalId: draftLocalId}
+
   track: (action, data={}) ->
     @analytics.track(action, _.extend(data, namespaceId: NamespaceStore.current()?.id))
 

module.exports =
AnalyticsStore = Reflux.createStore
  init: ->
    @analytics = Mixpanel.init("625e2300ef07cb4eb70a69b3638ca579")
    @listenTo NamespaceStore, => @identify()
    @identify()

    @_listenToActions()

  # We white list actions to track.
  #

        "$last_name": namespace.me().lastName()
        "namespaceId": namespace.id

  _listenToCoreActions: ->
    _.each @coreWindowActions(), @listenAndTrack()
    _.each @coreGlobalActions(), @listenAndTrack() if atom.isMainWindow()
