Paulo Reis 10 лет назад
Родитель
Сommit
07cce99c17

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

@@ -267,7 +267,9 @@ define [
 			return path
 			return path
 
 
 		$scope.recompile = (options = {}) ->
 		$scope.recompile = (options = {}) ->
-			event_tracking.sendCountly "editor-recompile", options
+			# event_tracking.sendCountly "editor-recompile", options
+			
+			event_tracking.sendCountlySampled "editor-recompile", options
 
 
 			return if $scope.pdf.compiling
 			return if $scope.pdf.compiling
 
 

+ 3 - 0
services/web/public/coffee/main/event.coffee

@@ -11,6 +11,9 @@ define [
 				eventData = { key }
 				eventData = { key }
 				eventData.segmentation = segmentation if segmentation?				
 				eventData.segmentation = segmentation if segmentation?				
 				Countly?.q.push([ "add_event", eventData ]);
 				Countly?.q.push([ "add_event", eventData ]);
+
+			sendCountlySampled: (key, segmentation) ->
+				@sendCountly key, segmentation if Math.random() < .01 
 		}
 		}
 
 
 	# App.directive "countlyTrack", () ->
 	# App.directive "countlyTrack", () ->