Track a few high-frequency events only once.

This commit is contained in:
Paulo Reis 2016-07-27 15:53:28 +01:00
parent 5ea9558976
commit 64654257a1
3 changed files with 6 additions and 6 deletions

View file

@ -72,13 +72,13 @@ define [
# Tracking code.
$scope.$watch "ui.view", (newView, oldView) ->
if newView? and newView != "editor" and newView != "pdf"
event_tracking.sendCountly "ide-open-view-#{ newView }"
event_tracking.sendCountlyOnce "ide-open-view-#{ newView }"
$scope.$watch "ui.chatOpen", (isOpen) ->
event_tracking.sendCountly "ide-open-chat" if isOpen
event_tracking.sendCountlyOnce "ide-open-chat" if isOpen
$scope.$watch "ui.leftMenuShown", (isOpen) ->
event_tracking.sendCountly "ide-open-left-menu" if isOpen
event_tracking.sendCountlyOnce "ide-open-left-menu" if isOpen
# End of tracking code.
window._ide = ide

View file

@ -333,7 +333,7 @@ define [
$scope.toggleLogs = () ->
$scope.shouldShowLogs = !$scope.shouldShowLogs
event_tracking.sendCountly "ide-open-logs" if $scope.shouldShowLogs
event_tracking.sendCountlyOnce "ide-open-logs" if $scope.shouldShowLogs
$scope.showPdf = () ->
$scope.pdf.view = "pdf"
@ -499,7 +499,7 @@ define [
App.controller "PdfLogEntryController", ["$scope", "ide", "event_tracking", ($scope, ide, event_tracking) ->
$scope.openInEditor = (entry) ->
event_tracking.sendCountly 'logs-jump-to-location'
event_tracking.sendCountlyOnce 'logs-jump-to-location'
entity = ide.fileTreeManager.findEntityByPath(entry.file)
return if !entity? or entity.type != "doc"
if entry.line?

View file

@ -3,7 +3,7 @@ define [
], (App) ->
App.controller "ShareController", ["$scope", "$modal", "event_tracking", ($scope, $modal, event_tracking) ->
$scope.openShareProjectModal = () ->
event_tracking.sendCountly "ide-open-share-modal"
event_tracking.sendCountlyOnce "ide-open-share-modal"
$modal.open(
templateUrl: "shareProjectModalTemplate"