mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Implement interstitial payment page for free trial button on project page with split test (#8311)
GitOrigin-RevId: b24b4f91d281c2756aed68ec176d138fcdd52e54
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
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'
|
||||
@@ -11,7 +16,12 @@ function startFreeTrial(source, version, $scope) {
|
||||
}
|
||||
eventTracking.sendMB('paywall-click', { 'paywall-type': source })
|
||||
|
||||
url = `/user/subscription/new?planCode=${plan}&ssp=true`
|
||||
if (interstitialPaymentAfterPaywallVariant === 'active') {
|
||||
url = '/user/subscription/choose-your-plan'
|
||||
} else {
|
||||
url = `/user/subscription/new?planCode=${plan}&ssp=true`
|
||||
}
|
||||
|
||||
url = `${url}&itm_campaign=${source}`
|
||||
if (version) {
|
||||
url = `${url}&itm_content=${version}`
|
||||
|
||||
Reference in New Issue
Block a user