diff --git a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js index e2acdba975..6ef5f1d1d0 100644 --- a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js +++ b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js @@ -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')