mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Teardown interstitial payment page split test and implement active variant (#9732)
GitOrigin-RevId: 755fd2f8a1be48ab6520aaab34ca2ea5d070302d
This commit is contained in:
parent
37b598fa5a
commit
39cb74286d
5 changed files with 2 additions and 32 deletions
|
@ -178,7 +178,6 @@ async function paymentPage(req, res) {
|
||||||
currency,
|
currency,
|
||||||
countryCode,
|
countryCode,
|
||||||
plan,
|
plan,
|
||||||
showStudentPlan: req.query.ssp === 'true',
|
|
||||||
recurlyConfig: JSON.stringify({
|
recurlyConfig: JSON.stringify({
|
||||||
currency,
|
currency,
|
||||||
subdomain: Settings.apis.recurly.subdomain,
|
subdomain: Settings.apis.recurly.subdomain,
|
||||||
|
|
|
@ -13,12 +13,6 @@ block content
|
||||||
.container(ng-controller="NewSubscriptionController" ng-cloak)
|
.container(ng-controller="NewSubscriptionController" ng-cloak)
|
||||||
.row.card-group
|
.row.card-group
|
||||||
.col-md-3.col-md-push-1
|
.col-md-3.col-md-push-1
|
||||||
if showStudentPlan
|
|
||||||
a.btn-primary.btn.plansPageStudentLink(
|
|
||||||
href,
|
|
||||||
ng-click="switchToStudent()"
|
|
||||||
) #{translate("special_price_student")}
|
|
||||||
|
|
||||||
.card.card-first
|
.card.card-first
|
||||||
.price-feature-description
|
.price-feature-description
|
||||||
h4(ng-if="planName") {{planName}}
|
h4(ng-if="planName") {{planName}}
|
||||||
|
|
|
@ -310,12 +310,6 @@ block content
|
||||||
|
|
||||||
|
|
||||||
.col-md-3.col-md-pull-4
|
.col-md-3.col-md-pull-4
|
||||||
if showStudentPlan
|
|
||||||
a.btn-primary.btn.plansPageStudentLink(
|
|
||||||
href,
|
|
||||||
ng-click="switchToStudent()"
|
|
||||||
) #{translate("special_price_student")}
|
|
||||||
|
|
||||||
.card.card-first
|
.card.card-first
|
||||||
.paymentPageFeatures
|
.paymentPageFeatures
|
||||||
h3 #{translate("unlimited_projects")}
|
h3 #{translate("unlimited_projects")}
|
||||||
|
|
|
@ -1,19 +1,10 @@
|
||||||
import * as eventTracking from '../infrastructure/event-tracking'
|
import * as eventTracking from '../infrastructure/event-tracking'
|
||||||
import getMeta from '../utils/meta'
|
|
||||||
|
|
||||||
const interstitialPaymentAfterPaywallVariant =
|
|
||||||
getMeta('ol-splitTestVariants')?.['interstitial-payment-from-paywall'] ??
|
|
||||||
'default'
|
|
||||||
|
|
||||||
function startFreeTrial(source, version, $scope) {
|
function startFreeTrial(source, version, $scope) {
|
||||||
const plan = 'collaborator_free_trial_7_days'
|
|
||||||
|
|
||||||
eventTracking.send('subscription-funnel', 'upgraded-free-trial', source)
|
eventTracking.send('subscription-funnel', 'upgraded-free-trial', source)
|
||||||
eventTracking.sendMB('paywall-click', { 'paywall-type': source })
|
eventTracking.sendMB('paywall-click', { 'paywall-type': source })
|
||||||
|
|
||||||
const searchParams = new URLSearchParams({
|
const searchParams = new URLSearchParams({
|
||||||
planCode: 'collaborator_free_trial_7_days',
|
|
||||||
ssp: 'true',
|
|
||||||
itm_campaign: source,
|
itm_campaign: source,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -25,15 +16,7 @@ function startFreeTrial(source, version, $scope) {
|
||||||
$scope.startedFreeTrial = true
|
$scope.startedFreeTrial = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interstitialPaymentAfterPaywallVariant === 'active') {
|
window.open(`/user/subscription/choose-your-plan?${searchParams.toString()}`)
|
||||||
window.open(
|
|
||||||
`/user/subscription/choose-your-plan?${searchParams.toString()}`
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
searchParams.set('ssp', 'true')
|
|
||||||
searchParams.set('planCode', plan)
|
|
||||||
window.open(`/user/subscription/new?${searchParams.toString()}`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgradePlan(source, $scope) {
|
function upgradePlan(source, $scope) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ describe('start free trial button', function () {
|
||||||
.should('eq', 'cypress-test')
|
.should('eq', 'cypress-test')
|
||||||
cy.get('@Open').should(
|
cy.get('@Open').should(
|
||||||
'have.been.calledOnceWithExactly',
|
'have.been.calledOnceWithExactly',
|
||||||
'/user/subscription/new?planCode=collaborator_free_trial_7_days&ssp=true&itm_campaign=cypress-test'
|
'/user/subscription/choose-your-plan?itm_campaign=cypress-test'
|
||||||
)
|
)
|
||||||
expect(onClickStub).to.be.called
|
expect(onClickStub).to.be.called
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue