Add sampled tracking method.

This commit is contained in:
Paulo Reis 2016-07-08 10:06:46 +01:00
parent 3a24c4bff9
commit 07cce99c17
2 changed files with 6 additions and 1 deletions

View file

@ -267,7 +267,9 @@ define [
return path
$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

View file

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