1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-22 08:56:38 +00:00

Merge pull request from sharelatex/subscription-analytics

Subscription analytics
This commit is contained in:
Jessica Lawshe 2018-03-22 08:47:42 -05:00 committed by GitHub
commit ffbdb760c6
4 changed files with 9 additions and 4 deletions
services/web
app/views/subscriptions
public/coffee/main

View file

@ -167,7 +167,7 @@ block content
br
a.btn.btn-info(
ng-href="/user/subscription/new?planCode=student{{ plansVariant == 'default' ? planQueryString : '_'+plansVariant }}&currency={{currencyCode}}",
ng-click="signUpNowClicked('student')"
ng-click="signUpNowClicked('student-monthly')"
) #{translate("start_free_trial")}
.col-md-4
@ -190,7 +190,7 @@ block content
br
a.btn.btn-info(
ng-href="/user/subscription/new?planCode=student-annual{{ plansVariant == 'default' ? '' : '_'+plansVariant }}&currency={{currencyCode}}",
ng-click="signUpNowClicked('student')"
ng-click="signUpNowClicked('student-annual')"
) #{translate("buy_now")}

View file

@ -1,7 +1,7 @@
define [
"base"
], (App) ->
App.controller "AccountSettingsController", ["$scope", "$http", "$modal", ($scope, $http, $modal) ->
App.controller "AccountSettingsController", ["$scope", "$http", "$modal", "event_tracking", ($scope, $http, $modal, event_tracking) ->
$scope.subscribed = true
$scope.unsubscribe = () ->
@ -24,6 +24,9 @@ define [
controller: "DeleteAccountModalController",
scope: $scope
)
$scope.upgradeIntegration = (service) ->
event_tracking.send 'subscription-funnel', 'settings-page', service
]
App.controller "DeleteAccountModalController", [

View file

@ -103,5 +103,6 @@ define [
request.then (response)->
$scope.sent = true
event_tracking.send 'subscription-funnel', 'plans-page', 'group-inquiry-sent'
$scope.error = (response.status != 200)
$scope.$apply()

View file

@ -369,9 +369,10 @@ define [
$scope.switchToAnnual = ->
$scope.ui.view = "annual"
event_tracking.send 'subscription-funnel', 'plans-page', 'student-prices'
event_tracking.send 'subscription-funnel', 'plans-page', 'annual-prices'
$scope.openGroupPlanModal = () ->
$modal.open {
templateUrl: "groupPlanModalTemplate"
}
event_tracking.send 'subscription-funnel', 'plans-page', 'group-inquiry-potential'