mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Track log hints feedback.
This commit is contained in:
parent
05dedeebb8
commit
c5f53ef431
2 changed files with 9 additions and 2 deletions
|
@ -128,12 +128,12 @@ div.full-size.pdf(ng-controller="PdfController")
|
|||
)
|
||||
label.card-hint-feedback-label #{translate("log_hint_feedback_label")}
|
||||
a.card-hint-feedback-positive(
|
||||
ng-click="feedbackSent = true;"
|
||||
ng-click="trackLogHintsPositiveFeedback(entry.ruleId); feedbackSent = true;"
|
||||
href
|
||||
) #{translate("answer_yes")}
|
||||
span /
|
||||
a.card-hint-feedback-negative(
|
||||
ng-click="feedbackSent = true;"
|
||||
ng-click="trackLogHintsNegativeFeedback(entry.ruleId); feedbackSent = true;"
|
||||
href
|
||||
) #{translate("answer_no")}
|
||||
.card-hint-feedback(ng-show="feedbackSent")
|
||||
|
|
|
@ -15,6 +15,13 @@ define [
|
|||
$scope.shouldShowLogs = false
|
||||
$scope.wikiEnabled = window.wikiEnabled;
|
||||
|
||||
# log hints tracking
|
||||
trackLogHintsFeedback = (isPositive, hintId) ->
|
||||
event_tracking.send 'log-hints', (if isPositive then 'feedback-positive' else 'feedback-negative'), hintId
|
||||
|
||||
$scope.trackLogHintsPositiveFeedback = (hintId) -> trackLogHintsFeedback true, hintId
|
||||
$scope.trackLogHintsNegativeFeedback = (hintId) -> trackLogHintsFeedback false, hintId
|
||||
|
||||
if ace.require("ace/lib/useragent").isMac
|
||||
$scope.modifierKey = "Cmd"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue