       params =
         t: 'appview'
         cd: @viewNameForPaneItem(item)
-        dt: item.getGrammar?()?.name
+
+      grammarName = item.getGrammar?()?.name
+      if grammarName?
+        params.dt = grammarName
       @send(params)
 
     @sendCommand: (commandName) ->

        an: 'atom'
        av: atom.getVersion()
        sr: "#{screen.width}x#{screen.height}"
        aiid: getReleaseChannel()

    @defaultParams: ->
      params = {}
      params.cd1 = startDate if startDate = localStorage.getItem('metrics.sd')
      memUse = process.memoryUsage()
      params.cm1 = memUse.heapUsed >> 20 # Convert bytes to megabytes
      params.cm2 = Math.round((memUse.heapUsed / memUse.heapTotal) * 100)

      # https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
      extend params,
