mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
update the view based on the variants
GitOrigin-RevId: 8aa833bb8d7faeabc25e2497821d5b74c16d3c2a
This commit is contained in:
parent
b9e8cbff2e
commit
34aec8f8be
1 changed files with 18 additions and 1 deletions
|
@ -51,7 +51,24 @@ export function updateLinkTargets() {
|
|||
|
||||
const plan = el.getAttribute('data-ol-start-new-subscription')
|
||||
const view = el.getAttribute('data-ol-item-view')
|
||||
const suffix = view === 'annual' ? `-annual` : `_free_trial_7_days`
|
||||
// annual split test trial (nudge, no-nudge, default)
|
||||
const annualTrialsVariant = getMeta('ol-splitTestVariants')?.[
|
||||
'annual-trials'
|
||||
]
|
||||
|
||||
let suffix = ''
|
||||
if (view === 'annual') {
|
||||
if (annualTrialsVariant === 'nudge') {
|
||||
suffix = '-annual_free_trial_7_days'
|
||||
} else if (annualTrialsVariant === 'no-nudge') {
|
||||
suffix = '-annual_free_trial_7_days'
|
||||
} else if (annualTrialsVariant === 'default') {
|
||||
suffix = '-annual'
|
||||
}
|
||||
} else {
|
||||
suffix = '_free_trial_7_days'
|
||||
}
|
||||
|
||||
const planCode = `${plan}${suffix}`
|
||||
|
||||
const location = el.getAttribute('data-ol-location')
|
||||
|
|
Loading…
Reference in a new issue