mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 06:43:58 +00:00
f2069c6208
and heap. Not tracking subscriptions or cancelations yet.
16 lines
505 B
CoffeeScript
16 lines
505 B
CoffeeScript
define () ->
|
|
class AnalyticsManager
|
|
constructor: (@ide) ->
|
|
@ide.editor.on "update:doc", () =>
|
|
@updateCount ||= 0
|
|
@updateCount++
|
|
if @updateCount == 100
|
|
ga('send', 'event', 'editor-interaction', 'multi-doc-update')
|
|
|
|
@ide.pdfManager.on "compile:pdf", () =>
|
|
@compileCount ||= 0
|
|
@compileCount++
|
|
if @compileCount == 1
|
|
ga('send', 'event', 'editor-interaction', 'single-compile')
|
|
if @compileCount == 3
|
|
ga('send', 'event', 'editor-interaction', 'multi-compile')
|