mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Track log-related actions.
This commit is contained in:
parent
d5efe81a46
commit
909f7c15b5
2 changed files with 13 additions and 3 deletions
|
@ -119,7 +119,11 @@ div.full-size.pdf(ng-controller="PdfController")
|
|||
ng-bind-html="wikiEnabled ? entry.humanReadableHint : stripHTMLFromString(entry.humanReadableHint)")
|
||||
.card-hint-actions.clearfix
|
||||
.card-hint-ext-link(ng-if="wikiEnabled")
|
||||
a(ng-href="{{ entry.extraInfoURL }}", target="_blank")
|
||||
a(
|
||||
ng-href="{{ entry.extraInfoURL }}",
|
||||
ng-click="trackLogHintsLearnMore()"
|
||||
target="_blank"
|
||||
)
|
||||
i.fa.fa-external-link
|
||||
| #{translate("log_hint_extra_info")}
|
||||
.card-hint-feedback(
|
||||
|
|
|
@ -16,8 +16,11 @@ define [
|
|||
$scope.wikiEnabled = window.wikiEnabled;
|
||||
|
||||
# log hints tracking
|
||||
$scope.trackLogHintsLearnMore = () ->
|
||||
event_tracking.send 'logs-hints-learn-more'
|
||||
|
||||
trackLogHintsFeedback = (isPositive, hintId) ->
|
||||
event_tracking.send 'log-hints', (if isPositive then 'feedback-positive' else 'feedback-negative'), hintId
|
||||
event_tracking.send 'log-hints-feedback', { isPositive, hintId }
|
||||
|
||||
$scope.trackLogHintsPositiveFeedback = (hintId) -> trackLogHintsFeedback true, hintId
|
||||
$scope.trackLogHintsNegativeFeedback = (hintId) -> trackLogHintsFeedback false, hintId
|
||||
|
@ -286,6 +289,7 @@ define [
|
|||
|
||||
$scope.toggleLogs = () ->
|
||||
$scope.shouldShowLogs = !$scope.shouldShowLogs
|
||||
event_tracking.send "ide-open-logs" if $scope.shouldShowLogs
|
||||
|
||||
$scope.showPdf = () ->
|
||||
$scope.pdf.view = "pdf"
|
||||
|
@ -293,6 +297,7 @@ define [
|
|||
|
||||
$scope.toggleRawLog = () ->
|
||||
$scope.pdf.showRawLog = !$scope.pdf.showRawLog
|
||||
event_tracking.send "logs-view-raw" if $scope.pdf.showRawLog
|
||||
|
||||
$scope.openClearCacheModal = () ->
|
||||
modalInstance = $modal.open(
|
||||
|
@ -445,8 +450,9 @@ define [
|
|||
ide.editorManager.openDoc(doc, gotoLine: line)
|
||||
]
|
||||
|
||||
App.controller "PdfLogEntryController", ["$scope", "ide", ($scope, ide) ->
|
||||
App.controller "PdfLogEntryController", ["$scope", "ide", "event_tracking", ($scope, ide, event_tracking) ->
|
||||
$scope.openInEditor = (entry) ->
|
||||
event_tracking.send 'logs-jump-to-location'
|
||||
entity = ide.fileTreeManager.findEntityByPath(entry.file)
|
||||
return if !entity? or entity.type != "doc"
|
||||
if entry.line?
|
||||
|
|
Loading…
Reference in a new issue