Merge pull request #2345 from overleaf/ta-itm-campaign-improvements

ITM Fields Improvements

GitOrigin-RevId: 7e9a46dc2b935e2cad8cb8d2e21dfa3c81291c2d
This commit is contained in:
Timothée Alby 2019-11-12 15:56:24 +07:00 committed by sharelatex
parent e000fd4615
commit 4f7c2deca5
3 changed files with 8 additions and 6 deletions

View file

@ -1,7 +1,7 @@
//- Buy Buttons
mixin btn_buy_collaborator(location)
a.btn.btn-primary(
ng-href="/user/subscription/new?planCode={{ getCollaboratorPlanCode() }}&currency={{currencyCode}}",
ng-href="/user/subscription/new?planCode={{ getCollaboratorPlanCode() }}&currency={{currencyCode}}&itm_campaign=plans&itm_content=" + location,
ng-click="signUpNowClicked('collaborator','" + location + "')"
)
span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
@ -15,7 +15,7 @@ mixin btn_buy_free(location)
span.text-capitalize #{translate('get_started_now')}
mixin btn_buy_professional(location)
a.btn.btn-primary(
ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '-annual' || planQueryString}}&currency={{currencyCode}}"
ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '-annual' || planQueryString}}&currency={{currencyCode}}&itm_campaign=plans&itm_content=" + location,
ng-click="signUpNowClicked('professional','" + location + "')"
)
span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
@ -23,13 +23,13 @@ mixin btn_buy_professional(location)
mixin btn_buy_student(location, plan)
if plan == 'annual'
a.btn.btn-primary(
ng-href="/user/subscription/new?planCode=student-annual&currency={{currencyCode}}",
ng-href="/user/subscription/new?planCode=student-annual&currency={{currencyCode}}&itm_campaign=plans&itm_content=" + location,
ng-click="signUpNowClicked('student-annual','" + location + "')"
) #{translate("buy_now")}
else
//- planQueryString will contain _free_trial_7_days
a.btn.btn-primary(
ng-href="/user/subscription/new?planCode=student{{planQueryString}}&currency={{currencyCode}}",
ng-href="/user/subscription/new?planCode=student{{planQueryString}}&currency={{currencyCode}}&itm_campaign=plans&itm_content=" + location,
ng-click="signUpNowClicked('student-monthly','" + location + "')"
) #{translate("start_free_trial")}

View file

@ -36,7 +36,9 @@ define(['base', 'directives/creditCards'], App =>
)
window.location = `/user/subscription/new?planCode=${planCode}&currency=${
$scope.currencyCode
}&cc=${$scope.data.coupon}`
}&cc=${$scope.data.coupon}&itm_campaign=${
window.ITMCampaign
}&itm_content=${window.ITMContent}`
}
eventTracking.sendMB('subscription-form', { plan: window.plan_code })

View file

@ -416,7 +416,7 @@ define(['base'], function(App) {
$scope.purchase = function() {
let { plan_code, size, usage, currency } = $scope.selected
plan_code = `group_${plan_code}_${size}_${usage}`
window.location = `/user/subscription/new?planCode=${plan_code}&currency=${currency}`
window.location = `/user/subscription/new?planCode=${plan_code}&currency=${currency}&itm_campaign=groups`
}
$scope.payByInvoice = function() {