Teardown interstitial payment page split test and implement active variant (#9732)

GitOrigin-RevId: 755fd2f8a1be48ab6520aaab34ca2ea5d070302d
This commit is contained in:
M Fahru 2022-10-11 12:40:00 -04:00 committed by Copybot
parent 37b598fa5a
commit 39cb74286d
5 changed files with 2 additions and 32 deletions

View file

@ -178,7 +178,6 @@ async function paymentPage(req, res) {
currency,
countryCode,
plan,
showStudentPlan: req.query.ssp === 'true',
recurlyConfig: JSON.stringify({
currency,
subdomain: Settings.apis.recurly.subdomain,

View file

@ -13,12 +13,6 @@ block content
.container(ng-controller="NewSubscriptionController" ng-cloak)
.row.card-group
.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
.price-feature-description
h4(ng-if="planName") {{planName}}

View file

@ -310,12 +310,6 @@ block content
.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
.paymentPageFeatures
h3 #{translate("unlimited_projects")}

View file

@ -1,19 +1,10 @@
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) {
const plan = 'collaborator_free_trial_7_days'
eventTracking.send('subscription-funnel', 'upgraded-free-trial', source)
eventTracking.sendMB('paywall-click', { 'paywall-type': source })
const searchParams = new URLSearchParams({
planCode: 'collaborator_free_trial_7_days',
ssp: 'true',
itm_campaign: source,
})
@ -25,15 +16,7 @@ function startFreeTrial(source, version, $scope) {
$scope.startedFreeTrial = true
}
if (interstitialPaymentAfterPaywallVariant === 'active') {
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()}`)
}
window.open(`/user/subscription/choose-your-plan?${searchParams.toString()}`)
}
function upgradePlan(source, $scope) {

View file

@ -82,7 +82,7 @@ describe('start free trial button', function () {
.should('eq', 'cypress-test')
cy.get('@Open').should(
'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
})