diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index dc2e054d71..966e02d586 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -616,6 +616,9 @@ const ProjectController = { compileLogEventsAssignment(cb) { SplitTestHandler.getAssignment(req, res, 'compile-log-events', cb) }, + paywallCtaAssignment(cb) { + SplitTestHandler.getAssignment(req, res, 'paywall-cta', cb) + }, projectTags(cb) { if (!userId) { return cb(null, []) diff --git a/services/web/app/src/Features/Project/ProjectListController.js b/services/web/app/src/Features/Project/ProjectListController.js index e6235b17aa..c78ce87532 100644 --- a/services/web/app/src/Features/Project/ProjectListController.js +++ b/services/web/app/src/Features/Project/ProjectListController.js @@ -400,6 +400,15 @@ async function projectListPage(req, res, next) { ) } + try { + await SplitTestHandler.promises.getAssignment(req, res, 'paywall-cta') + } catch (error) { + logger.error( + { err: error }, + 'failed to get "paywall-cta" split test assignment' + ) + } + res.render('project/list-react', { title: 'your_projects', usersBestSubscription, diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index aa46191d9b..fa1e6f6b79 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -41,6 +41,7 @@ "add_company_details": "", "add_email_to_claim_features": "", "add_files": "", + "add_more_collaborators": "", "add_more_managers": "", "add_more_members": "", "add_new_email": "", @@ -65,6 +66,7 @@ "all_premium_features_including": "", "all_projects": "", "all_projects_will_be_transferred_immediately": "", + "already_subscribed_try_refreshing_the_page": "", "also": "", "an_email_has_already_been_sent_to": "", "an_error_occurred_when_verifying_the_coupon_code": "", @@ -409,7 +411,6 @@ "find_out_more_about_institution_login": "", "find_out_more_about_the_file_outline": "", "find_out_more_nt": "", - "find_the_symbols_you_need_with_premium": "", "first_name": "", "first_x_days_free_after_that_y_per_month": "", "first_x_days_free_after_that_y_per_year": "", @@ -439,9 +440,17 @@ "generic_if_problem_continues_contact_us": "", "generic_linked_file_compile_error": "", "generic_something_went_wrong": "", + "get_advanced_reference_search": "", "get_collaborative_benefits": "", "get_discounted_plan": "", + "get_dropbox_sync": "", + "get_full_project_history": "", + "get_git_integration": "", + "get_github_sync": "", + "get_more_compile_time": "", "get_most_subscription_by_checking_features": "", + "get_symbol_palette": "", + "get_track_changes": "", "git": "", "git_authentication_token": "", "git_authentication_token_create_modal_info_1": "", @@ -741,6 +750,7 @@ "maximum_files_uploaded_together": "", "maybe_later": "", "members_management": "", + "mendeley_cta": "", "mendeley_groups_loading_error": "", "mendeley_groups_relink": "", "mendeley_integration": "", @@ -1247,6 +1257,7 @@ "subject_to_additional_vat": "", "submit_title": "", "subscribe": "", + "subscribe_to_find_the_symbols_you_need_faster": "", "subscription_admins_cannot_be_deleted": "", "subscription_canceled": "", "subscription_canceled_and_terminate_on_x": "", @@ -1594,6 +1605,7 @@ "youve_unlinked_all_users": "", "zoom_in": "", "zoom_out": "", + "zotero_cta": "", "zotero_groups_loading_error": "", "zotero_groups_relink": "", "zotero_integration": "", diff --git a/services/web/frontend/js/features/history/components/change-list/owner-paywall-prompt.tsx b/services/web/frontend/js/features/history/components/change-list/owner-paywall-prompt.tsx index c057cea145..3248d98eb8 100644 --- a/services/web/frontend/js/features/history/components/change-list/owner-paywall-prompt.tsx +++ b/services/web/frontend/js/features/history/components/change-list/owner-paywall-prompt.tsx @@ -4,6 +4,7 @@ import { useCallback, useEffect, useState } from 'react' import * as eventTracking from '../../../../infrastructure/event-tracking' import StartFreeTrialButton from '../../../../shared/components/start-free-trial-button' import { paywallPrompt } from '../../../../main/account-upgrade' +import { useSplitTestContext } from '@/shared/context/split-test-context' function FeatureItem({ text }: { text: string }) { return ( @@ -17,6 +18,9 @@ export function OwnerPaywallPrompt() { const { t } = useTranslation() const [clickedFreeTrialButton, setClickedFreeTrialButton] = useState(false) + const { splitTestVariants } = useSplitTestContext() + const hasNewPaywallCta = splitTestVariants['paywall-cta'] === 'enabled' + useEffect(() => { eventTracking.send('subscription-funnel', 'editor-click-feature', 'history') paywallPrompt('history') @@ -32,7 +36,7 @@ export function OwnerPaywallPrompt() {
{t('currently_seeing_only_24_hrs_history')}
- {t('upgrade_to_get_feature', { feature: 'full Project History' })} + {t('upgrade_to_get_feature', { feature: 'full project history' })}
{t('refresh_page_after_starting_free_trial')}
diff --git a/services/web/frontend/js/features/pdf-preview/components/compile-time-warning.tsx b/services/web/frontend/js/features/pdf-preview/components/compile-time-warning.tsx index c28acdf3d9..4f3ea2a23b 100644 --- a/services/web/frontend/js/features/pdf-preview/components/compile-time-warning.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/compile-time-warning.tsx @@ -5,6 +5,7 @@ import * as eventTracking from '../../../infrastructure/event-tracking' import StartFreeTrialButton from '../../../shared/components/start-free-trial-button' import { useDetachCompileContext } from '../../../shared/context/detach-compile-context' import usePersistedState from '../../../shared/hooks/use-persisted-state' +import { useSplitTestContext } from '@/shared/context/split-test-context' const TWENTY_FOUR_DAYS = 24 * 60 * 60 * 24 * 1000 @@ -24,6 +25,9 @@ function CompileTimeWarning() { isProjectOwner, } = useDetachCompileContext() + const { splitTestVariants } = useSplitTestContext() + const hasNewPaywallCta = splitTestVariants['paywall-cta'] === 'enabled' + useEffect(() => { if (deliveryLatencies && deliveryLatencies.compileTimeServerE2E) { // compile-timeout-20s test @@ -101,7 +105,7 @@ function CompileTimeWarning() { handleClick={handleUpgradeClick} source="compile-time-warning" > - {t('upgrade')} + {hasNewPaywallCta ? t('get_more_compile_time') : t('upgrade')} diff --git a/services/web/frontend/js/features/pdf-preview/components/compile-timeout-changing-soon.tsx b/services/web/frontend/js/features/pdf-preview/components/compile-timeout-changing-soon.tsx index 5f6cd56498..9ca3135991 100644 --- a/services/web/frontend/js/features/pdf-preview/components/compile-timeout-changing-soon.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/compile-timeout-changing-soon.tsx @@ -3,6 +3,7 @@ import StartFreeTrialButton from '@/shared/components/start-free-trial-button' import { Trans, useTranslation } from 'react-i18next' import * as eventTracking from '@/infrastructure/event-tracking' import { FC } from 'react' +import { useSplitTestContext } from '@/shared/context/split-test-context' const sendInfoClickEvent = () => { eventTracking.sendMB('paywall-info-click', { @@ -17,6 +18,9 @@ export const CompileTimeoutChangingSoon: FC<{ }> = ({ isProjectOwner = false, handleDismissChangingSoon }) => { const { t } = useTranslation() + const { splitTestVariants } = useSplitTestContext() + const hasNewPaywallCta = splitTestVariants['paywall-cta'] === 'enabled' + const compileTimeoutChangesBlogLink = ( /* eslint-disable-next-line jsx-a11y/anchor-has-content */ - {t('start_free_trial_without_exclamation')} + {hasNewPaywallCta + ? t('get_more_compile_time') + : t('start_free_trial_without_exclamation')} } ariaLive="polite" diff --git a/services/web/frontend/js/features/pdf-preview/components/compile-timeout-warning.tsx b/services/web/frontend/js/features/pdf-preview/components/compile-timeout-warning.tsx index f593e06ea9..3ab2a235e5 100644 --- a/services/web/frontend/js/features/pdf-preview/components/compile-timeout-warning.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/compile-timeout-warning.tsx @@ -2,6 +2,7 @@ import Notification from '@/shared/components/notification' import StartFreeTrialButton from '@/shared/components/start-free-trial-button' import { useTranslation } from 'react-i18next' import { FC } from 'react' +import { useSplitTestContext } from '@/shared/context/split-test-context' export const CompileTimeoutWarning: FC<{ handleDismissWarning: () => void @@ -9,6 +10,9 @@ export const CompileTimeoutWarning: FC<{ }> = ({ handleDismissWarning, showNewCompileTimeoutUI }) => { const { t } = useTranslation() + const { splitTestVariants } = useSplitTestContext() + const hasNewPaywallCta = splitTestVariants['paywall-cta'] === 'enabled' + return (