mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Track editor macro views.
This commit is contained in:
parent
a40cbdd84e
commit
71b8f86e89
1 changed files with 11 additions and 1 deletions
|
@ -42,7 +42,7 @@ define [
|
|||
ReferencesManager
|
||||
) ->
|
||||
|
||||
App.controller "IdeController", ($scope, $timeout, ide, localStorage) ->
|
||||
App.controller "IdeController", ($scope, $timeout, ide, localStorage, event_tracking) ->
|
||||
# Don't freak out if we're already in an apply callback
|
||||
$scope.$originalApply = $scope.$apply
|
||||
$scope.$apply = (fn = () ->) ->
|
||||
|
@ -69,6 +69,16 @@ define [
|
|||
|
||||
$scope.chat = {}
|
||||
|
||||
# Tracking code.
|
||||
$scope.$watch "ui.view", (newView, oldView) ->
|
||||
event_tracking.send "ide-open-view-#{ newView }" if newView?
|
||||
|
||||
$scope.$watch "ui.chatOpen", (isOpen) ->
|
||||
event_tracking.send "ide-open-chat" if isOpen
|
||||
|
||||
$scope.$watch "ui.leftMenuShown", (isOpen) ->
|
||||
event_tracking.send "ide-open-left-menu" if isOpen
|
||||
# End of tracking code.
|
||||
|
||||
window._ide = ide
|
||||
|
||||
|
|
Loading…
Reference in a new issue