mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4084 from overleaf/ab-subscription-flow-events
Subscription flow analytics events GitOrigin-RevId: c74121031ba8623244657c607a76a513380e96f5
This commit is contained in:
parent
18d62dcee9
commit
551e2bfb5c
2 changed files with 11 additions and 6 deletions
|
@ -73,6 +73,7 @@ block content
|
||||||
form(
|
form(
|
||||||
name="simpleCCForm"
|
name="simpleCCForm"
|
||||||
novalidate
|
novalidate
|
||||||
|
ng-keypress="filledForm()"
|
||||||
)
|
)
|
||||||
|
|
||||||
div.payment-method-toggle
|
div.payment-method-toggle
|
||||||
|
@ -353,4 +354,4 @@ block content
|
||||||
id="cvv-tooltip-tpl.html"
|
id="cvv-tooltip-tpl.html"
|
||||||
)
|
)
|
||||||
p !{translate("for_visa_mastercard_and_discover", {}, ['strong', 'strong', 'strong'])}
|
p !{translate("for_visa_mastercard_and_discover", {}, ['strong', 'strong', 'strong'])}
|
||||||
p !{translate("for_american_express", {}, ['strong', 'strong', 'strong'])}
|
p !{translate("for_american_express", {}, ['strong', 'strong', 'strong'])}
|
||||||
|
|
|
@ -34,7 +34,7 @@ export default App.controller(
|
||||||
$scope.switchToStudent = function () {
|
$scope.switchToStudent = function () {
|
||||||
const currentPlanCode = window.plan_code
|
const currentPlanCode = window.plan_code
|
||||||
const planCode = currentPlanCode.replace('collaborator', 'student')
|
const planCode = currentPlanCode.replace('collaborator', 'student')
|
||||||
eventTracking.sendMB('subscription-form-switch-to-student', {
|
eventTracking.sendMB('payment-page-switch-to-student', {
|
||||||
plan: window.plan_code,
|
plan: window.plan_code,
|
||||||
})
|
})
|
||||||
eventTracking.send(
|
eventTracking.send(
|
||||||
|
@ -45,7 +45,7 @@ export default App.controller(
|
||||||
window.location = `/user/subscription/new?planCode=${planCode}¤cy=${$scope.currencyCode}&cc=${$scope.data.coupon}&itm_campaign=${window.ITMCampaign}&itm_content=${window.ITMContent}`
|
window.location = `/user/subscription/new?planCode=${planCode}¤cy=${$scope.currencyCode}&cc=${$scope.data.coupon}&itm_campaign=${window.ITMCampaign}&itm_content=${window.ITMContent}`
|
||||||
}
|
}
|
||||||
|
|
||||||
eventTracking.sendMB('subscription-form', { plan: window.plan_code })
|
eventTracking.sendMB('payment-page-view', { plan: window.plan_code })
|
||||||
eventTracking.send(
|
eventTracking.send(
|
||||||
'subscription-funnel',
|
'subscription-funnel',
|
||||||
'subscription-form-viewed',
|
'subscription-form-viewed',
|
||||||
|
@ -211,7 +211,7 @@ export default App.controller(
|
||||||
}
|
}
|
||||||
$scope.validation.errorFields = {}
|
$scope.validation.errorFields = {}
|
||||||
if (err != null) {
|
if (err != null) {
|
||||||
eventTracking.sendMB('subscription-error', err)
|
eventTracking.sendMB('payment-page-form-error', err)
|
||||||
eventTracking.send('subscription-funnel', 'subscription-error')
|
eventTracking.send('subscription-funnel', 'subscription-error')
|
||||||
// We may or may not be in a digest loop here depending on
|
// We may or may not be in a digest loop here depending on
|
||||||
// whether recurly could do validation locally, so do it async
|
// whether recurly could do validation locally, so do it async
|
||||||
|
@ -263,7 +263,7 @@ export default App.controller(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventTracking.sendMB('subscription-form-submitted', {
|
eventTracking.sendMB('payment-page-form-submit', {
|
||||||
currencyCode: postData.subscriptionDetails.currencyCode,
|
currencyCode: postData.subscriptionDetails.currencyCode,
|
||||||
plan_code: postData.subscriptionDetails.plan_code,
|
plan_code: postData.subscriptionDetails.plan_code,
|
||||||
coupon_code: postData.subscriptionDetails.coupon_code,
|
coupon_code: postData.subscriptionDetails.coupon_code,
|
||||||
|
@ -277,7 +277,7 @@ export default App.controller(
|
||||||
return $http
|
return $http
|
||||||
.post('/user/subscription/create', postData)
|
.post('/user/subscription/create', postData)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
eventTracking.sendMB('subscription-submission-success')
|
eventTracking.sendMB('payment-page-form-success')
|
||||||
eventTracking.send(
|
eventTracking.send(
|
||||||
'subscription-funnel',
|
'subscription-funnel',
|
||||||
'subscription-submission-success',
|
'subscription-submission-success',
|
||||||
|
@ -629,5 +629,9 @@ export default App.controller(
|
||||||
{ code: 'ZM', name: 'Zambia' },
|
{ code: 'ZM', name: 'Zambia' },
|
||||||
{ code: 'ZW', name: 'Zimbabwe' },
|
{ code: 'ZW', name: 'Zimbabwe' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
$scope.filledForm = function () {
|
||||||
|
eventTracking.sendMBOnce('payment-page-form-fill')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue