Merge pull request #6561 from overleaf/tm-subscription-cancel-button-split-test

Update copy for subscription cancellation, in split test variant

GitOrigin-RevId: ab5847238b950099bf41b9d4c08f325ffce1051d
This commit is contained in:
Timothée Alby 2022-02-10 10:48:25 +01:00 committed by Copybot
parent f5a74a014f
commit 62b662f07a
3 changed files with 19 additions and 2 deletions

View file

@ -155,6 +155,13 @@ async function userSubscriptionPage(req, res) {
AnalyticsManager.recordEventForSession(req.session, 'subscription-page-view')
const assignment = await SplitTestHandler.promises.getAssignment(
req,
'subscription-cancel-button'
)
const cancelButtonNewCopy = assignment && assignment.variant === 'new-copy'
const data = {
title: 'your_subscription',
plans,
@ -170,6 +177,7 @@ async function userSubscriptionPage(req, res) {
v1SubscriptionStatus,
currentInstitutionsWithLicence,
groupPlanModalOptions,
cancelButtonNewCopy,
}
res.render('subscriptions/dashboard', data)
}

View file

@ -33,7 +33,14 @@ div(ng-controller="RecurlySubscriptionController")
|  
a(href=personalSubscription.recurly.accountManagementLink, target="_blank").btn.btn-info #{translate("view_your_invoices")}
|  
a(href, ng-click="switchToCancellationView()", ng-hide="recurlyLoadError").btn.btn-danger !{translate("cancel_your_subscription")}
unless (cancelButtonNewCopy)
a(href, ng-click="switchToCancellationView()", ng-hide="recurlyLoadError", event-tracking='subscription-page-cancel-button-click', event-tracking-mb="true", event-tracking-trigger="click").btn.btn-danger !{translate("stop_your_subscription")}
if (cancelButtonNewCopy)
p
a(href, ng-click="switchToCancellationView()", ng-hide="recurlyLoadError", event-tracking='subscription-page-cancel-button-click', event-tracking-mb="true", event-tracking-trigger="click").btn.btn-danger !{translate("cancel_your_subscription")}
unless (personalSubscription.recurly.trialEndsAtFormatted && personalSubscription.recurly.trial_ends_at > Date.now())
p
i !{translate("subscription_will_remain_active_until_end_of_billing_period_x", {terminationDate: personalSubscription.recurly.nextPaymentDueAt}, ['strong'])}
when "canceled"
p !{translate("currently_subscribed_to_plan", {planName: personalSubscription.plan.name}, ['strong'])}
p !{translate("subscription_canceled_and_terminate_on_x", {terminateDate: personalSubscription.recurly.nextPaymentDueAt}, ['strong'])}

View file

@ -788,7 +788,9 @@
"activate": "Activate",
"activating": "Activating",
"ill_take_it": "Ill take it!",
"cancel_your_subscription": "Stop Your Subscription",
"cancel_your_subscription": "Cancel Your Subscription",
"stop_your_subscription": "Stop Your Subscription",
"subscription_will_remain_active_until_end_of_billing_period_x": "Your subscription will remain active until the end of your billing period, <0>__terminationDate__</0>.",
"no_thanks_cancel_now": "No thanks, I still want to cancel",
"cancel_my_account": "Cancel my subscription",
"sure_you_want_to_cancel": "Are you sure you want to cancel?",