diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 18dcb23624..3aa6f919e6 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -14,14 +14,11 @@ const V1SubscriptionManager = require('./V1SubscriptionManager') const Errors = require('../Errors/Errors') const HttpErrorHandler = require('../Errors/HttpErrorHandler') const SubscriptionErrors = require('./Errors') -const SplitTestHandler = require('../SplitTests/SplitTestHandler') const AnalyticsManager = require('../Analytics/AnalyticsManager') const RecurlyEventHandler = require('./RecurlyEventHandler') const { expressify } = require('../../util/promises') const OError = require('@overleaf/o-error') -const SUBSCRIPTION_PAGE_SPLIT_TEST = 'subscription-page' - async function plansPage(req, res) { const plans = SubscriptionViewModelBuilder.buildPlansList() @@ -119,45 +116,13 @@ async function userSubscriptionPage(req, res) { personalSubscription ? personalSubscription.plan : undefined ) - let subscriptionCopy = 'default' - if ( - personalSubscription || - hasSubscription || - (memberGroupSubscriptions && memberGroupSubscriptions.length > 0) || - currentInstitutionsWithLicence.length > 0 - ) { - AnalyticsManager.recordEvent(user._id, 'subscription-page-view') - } else { - try { - const testSegmentation = await SplitTestHandler.promises.getTestSegmentation( - user._id, - SUBSCRIPTION_PAGE_SPLIT_TEST - ) - if (testSegmentation.enabled) { - subscriptionCopy = testSegmentation.variant - - AnalyticsManager.recordEvent(user._id, 'subscription-page-view', { - splitTestId: SUBSCRIPTION_PAGE_SPLIT_TEST, - splitTestVariantId: testSegmentation.variant, - }) - } else { - AnalyticsManager.recordEvent(user._id, 'subscription-page-view') - } - } catch (error) { - logger.error( - { err: error }, - `Failed to get segmentation for user '${user._id}' and split test '${SUBSCRIPTION_PAGE_SPLIT_TEST}'` - ) - AnalyticsManager.recordEvent(user._id, 'subscription-page-view') - } - } + AnalyticsManager.recordEvent(user._id, 'subscription-page-view') const data = { title: 'your_subscription', plans, user, hasSubscription, - subscriptionCopy, fromPlansPage, personalSubscription, memberGroupSubscriptions, diff --git a/services/web/app/views/subscriptions/dashboard.pug b/services/web/app/views/subscriptions/dashboard.pug index 7688648c79..b4dbb05645 100644 --- a/services/web/app/views/subscriptions/dashboard.pug +++ b/services/web/app/views/subscriptions/dashboard.pug @@ -55,14 +55,9 @@ block content a(href="mailto:support@overleaf.com") support@overleaf.com | to find out more. else - if (subscriptionCopy === 'new') - p(ng-non-bindable) You are on the #{settings.appName} Free plan. Upgrade to access these Premium Features: - ul - li Invite more collaborators - for feature in ['realtime_track_changes', 'full_doc_history', 'reference_search', 'reference_sync', 'dropbox_integration_lowercase', 'github_integration_lowercase', 'priority_support'] - li #{translate(feature)} - a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now - else - p(ng-non-bindable) You're on the #{settings.appName} Free plan. - | - a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now + p(ng-non-bindable) You are on the #{settings.appName} Free plan. Upgrade to access these Premium Features: + ul + li #{translate('invite_more_collabs')} + for feature in ['realtime_track_changes', 'full_doc_history', 'reference_search', 'reference_sync', 'dropbox_integration_lowercase', 'github_integration_lowercase', 'priority_support'] + li #{translate(feature)} + a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 84bfbfd2f8..f542de0b72 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -455,6 +455,7 @@ "github_integration_info": "Push and pull commits to and from GitHub or directly from Git, so you or your collaborators can work offline with Git and online with Overleaf.", "latex_editor_info": "Everything you need in a modern LaTeX editor --- spell check, intelligent autocomplete, syntax highlighting, dozens of color themes, vim and emacs bindings, help with LaTeX warnings and error messages, and much more.", "change_plans_any_time": "You can change plans or change your account at any time. ", + "invite_more_collab": "Invite more collaborators", "number_collab": "Number of collaborators", "unlimited_private_info": "All your projects are private by default. Invite collaborators to read or edit by email address or by sending them a secret link.", "unlimited_private": "Unlimited private projects",