mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-11 09:16:24 +00:00
Fix wrong url search params format for angular free trial button on project page (#8631)
GitOrigin-RevId: 76cff3caaeb9e492263b423116eb465b32d6ec3a
This commit is contained in:
parent
bbaac83b82
commit
9e6c2af73c
1 changed files with 11 additions and 8 deletions
|
@ -10,21 +10,24 @@ function startFreeTrial(source, version, $scope) {
|
|||
|
||||
const w = window.open()
|
||||
const go = function () {
|
||||
let url
|
||||
if (typeof ga === 'function') {
|
||||
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
|
||||
}
|
||||
eventTracking.sendMB('paywall-click', { 'paywall-type': source })
|
||||
|
||||
if (interstitialPaymentAfterPaywallVariant === 'active') {
|
||||
url = '/user/subscription/choose-your-plan'
|
||||
} else {
|
||||
url = `/user/subscription/new?planCode=${plan}&ssp=true`
|
||||
const searchParams = new URLSearchParams({ itm_campaign: source })
|
||||
|
||||
if (version) {
|
||||
searchParams.set('itm_content', version)
|
||||
}
|
||||
|
||||
url = `${url}&itm_campaign=${source}`
|
||||
if (version) {
|
||||
url = `${url}&itm_content=${version}`
|
||||
let url
|
||||
if (interstitialPaymentAfterPaywallVariant === 'active') {
|
||||
url = `/user/subscription/choose-your-plan?${searchParams.toString()}`
|
||||
} else {
|
||||
searchParams.set('ssp', 'true')
|
||||
searchParams.set('planCode', plan)
|
||||
url = `/user/subscription/new?${searchParams.toString()}`
|
||||
}
|
||||
|
||||
if ($scope) {
|
||||
|
|
Loading…
Add table
Reference in a new issue