Merge pull request #2556 from overleaf/cmg-missing-analytics

Add missing Google Analytics events

GitOrigin-RevId: 37f8ca52829ea00bd73b2cd1e0045c48839ea970
This commit is contained in:
nate stemen 2020-02-03 09:11:36 -05:00 committed by Copybot
parent aa48d639a0
commit dda4ce18d3
5 changed files with 23 additions and 4 deletions

View file

@ -161,10 +161,10 @@
hr hr
p.small #{translate("on_free_sl")} p.small #{translate("on_free_sl")}
p p
a(href="/user/subscription/plans").btn.btn-primary #{translate("upgrade")} a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")}
p.small.text-centered p.small.text-centered
| #{translate("or_unlock_features_bonus")} | #{translate("or_unlock_features_bonus")}
a(href="/user/bonus") #{translate("sharing_sl")}. a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}.
script. script.

View file

@ -50,4 +50,4 @@ block content
-else -else
p(ng-non-bindable) You're on the #{settings.appName} Free plan. p(ng-non-bindable) You're on the #{settings.appName} Free plan.
| |
a(href="/user/subscription/plans").btn.btn-primary Upgrade now a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now

View file

@ -27,6 +27,7 @@ define([
'main/annual-upgrade', 'main/annual-upgrade',
'main/register-users', 'main/register-users',
'main/subscription/team-invite-controller', 'main/subscription/team-invite-controller',
'main/subscription/upgrade-subscription',
'main/contact-us', 'main/contact-us',
'main/learn', 'main/learn',
'main/exposed-settings', 'main/exposed-settings',

View file

@ -1,11 +1,20 @@
define(['base'], App => define(['base'], App =>
App.controller('LeftHandMenuPromoController', function( App.controller('LeftHandMenuPromoController', function(
$scope, $scope,
UserAffiliationsDataService UserAffiliationsDataService,
eventTracking
) { ) {
$scope.hasProjects = window.data.projects.length > 0 $scope.hasProjects = window.data.projects.length > 0
$scope.userHasNoSubscription = window.userHasNoSubscription $scope.userHasNoSubscription = window.userHasNoSubscription
$scope.upgradeSubscription = function() {
eventTracking.send('subscription-funnel', 'project-page', 'upgrade')
}
$scope.share = function() {
eventTracking.send('subscription-funnel', 'project-page', 'sharing')
}
const _userHasNoAffiliation = function() { const _userHasNoAffiliation = function() {
$scope.userEmails = [] $scope.userEmails = []
$scope.userAffiliations = [] $scope.userAffiliations = []

View file

@ -0,0 +1,9 @@
define(['base'], App =>
App.controller('UpgradeSubscriptionController', function(
$scope,
eventTracking
) {
$scope.upgradeSubscription = function() {
eventTracking.send('subscription-funnel', 'subscription-page', 'upgrade')
}
}))