mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 01:12:27 +00:00
Track hints feedback in both GA and Countly; clean-up.
This commit is contained in:
parent
0dd3a70b4b
commit
8e2475afdc
3 changed files with 8 additions and 6 deletions
|
@ -71,21 +71,23 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|||
if (session && session.user)
|
||||
script(type="text/javascript").
|
||||
Countly.q.push(['user_details', {
|
||||
handle: '#{session.user._id}',
|
||||
email: '#{session.user.email}',
|
||||
custom: {
|
||||
handle: '#{session.user._id}',
|
||||
}
|
||||
}]);
|
||||
|
||||
if (justRegistered)
|
||||
script(type="text/javascript").
|
||||
Countly.q.push(['add_event',{
|
||||
key: 'user-registered'
|
||||
});
|
||||
}]);
|
||||
|
||||
if (justLoggedIn)
|
||||
script(type="text/javascript").
|
||||
Countly.q.push(['add_event',{
|
||||
key: 'user-logged-in'
|
||||
});
|
||||
}]);
|
||||
// End countly Analytics
|
||||
|
||||
script(type="text/javascript").
|
||||
|
|
|
@ -20,6 +20,7 @@ define [
|
|||
event_tracking.sendCountly "logs-hints-learn-more"
|
||||
|
||||
trackLogHintsFeedback = (isPositive, hintId) ->
|
||||
event_tracking.send 'log-hints', (if isPositive then 'feedback-positive' else 'feedback-negative'), hintId
|
||||
event_tracking.sendCountly "log-hints-feedback", { isPositive, hintId }
|
||||
|
||||
$scope.trackLogHintsPositiveFeedback = (hintId) -> trackLogHintsFeedback true, hintId
|
||||
|
|
|
@ -9,9 +9,8 @@ define [
|
|||
|
||||
sendCountly: (key, segmentation) ->
|
||||
eventData = { key }
|
||||
eventData.segmentation = segmentation if segmentation?
|
||||
|
||||
Countly.q.push([ "add_event", eventData ]);
|
||||
eventData.segmentation = segmentation if segmentation?
|
||||
Countly?.q.push([ "add_event", eventData ]);
|
||||
}
|
||||
|
||||
# App.directive "countlyTrack", () ->
|
||||
|
|
Loading…
Reference in a new issue