Преглед изворни кода

Track a few high-frequency events only once.

Paulo Reis пре 10 година
родитељ
комит
64654257a1

+ 3 - 3
services/web/public/coffee/ide.coffee

@@ -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

+ 2 - 2
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -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?

+ 1 - 1
services/web/public/coffee/ide/share/controllers/ShareController.coffee

@@ -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"