Merge pull request #18877 from overleaf/jel-sales-ad
[web] Remove 2 sales ad variants and increase probability of FOMO variant GitOrigin-RevId: 6045dd4255313ae53f255afa528695583171d55b
This commit is contained in:
@@ -352,7 +352,7 @@ async function projectListPage(req, res, next) {
|
||||
|
||||
const groupsAndEnterpriseBannerVariant =
|
||||
showGroupsAndEnterpriseBanner &&
|
||||
_.sample(['did-you-know', 'on-premise', 'people', 'FOMO'])
|
||||
_.sample(['on-premise', 'FOMO', 'FOMO', 'FOMO'])
|
||||
|
||||
let showWritefullPromoBanner = false
|
||||
if (Features.hasFeature('saas') && !req.session.justRegistered) {
|
||||
|
||||
@@ -284,7 +284,6 @@
|
||||
"details_provided_by_google_explanation": "",
|
||||
"dictionary": "",
|
||||
"did_you_know_institution_providing_professional": "",
|
||||
"did_you_know_that_overleaf_offers": "",
|
||||
"disable_single_sign_on": "",
|
||||
"disable_sso": "",
|
||||
"disable_stop_on_first_error": "",
|
||||
|
||||
+13
-16
@@ -6,7 +6,18 @@ import customLocalStorage from '../../../../infrastructure/local-storage'
|
||||
import { useProjectListContext } from '../../context/project-list-context'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const variants = ['did-you-know', 'on-premise', 'people', 'FOMO'] as const
|
||||
type variantsType = 'on-premise' | 'FOMO'
|
||||
const variants = ['on-premise', 'FOMO'] as variantsType[]
|
||||
|
||||
type urlForVariantsType = {
|
||||
[key in variantsType]: string // eslint-disable-line no-unused-vars
|
||||
}
|
||||
|
||||
const urlForVariants: urlForVariantsType = {
|
||||
'on-premise': '/for/contact-sales-2',
|
||||
FOMO: '/for/contact-sales-4',
|
||||
}
|
||||
|
||||
type GroupsAndEnterpriseBannerVariant = (typeof variants)[number]
|
||||
|
||||
let viewEventSent = false
|
||||
@@ -27,9 +38,7 @@ export default function GroupsAndEnterpriseBanner() {
|
||||
|
||||
const hasDismissedGroupsAndEnterpriseBanner = hasRecentlyDismissedBanner()
|
||||
|
||||
const contactSalesUrl = `/for/contact-sales-${
|
||||
variants.indexOf(groupsAndEnterpriseBannerVariant) + 1
|
||||
}`
|
||||
const contactSalesUrl = urlForVariants[groupsAndEnterpriseBannerVariant]
|
||||
|
||||
const shouldRenderBanner =
|
||||
showGroupsAndEnterpriseBanner &&
|
||||
@@ -98,11 +107,7 @@ function BannerContent({
|
||||
}: {
|
||||
variant: GroupsAndEnterpriseBannerVariant
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
switch (variant) {
|
||||
case 'did-you-know':
|
||||
return <span>{t('did_you_know_that_overleaf_offers')}</span>
|
||||
case 'on-premise':
|
||||
return (
|
||||
<span>
|
||||
@@ -111,14 +116,6 @@ function BannerContent({
|
||||
companies. Get in touch to learn more.
|
||||
</span>
|
||||
)
|
||||
case 'people':
|
||||
return (
|
||||
<span>
|
||||
Other people at your company may already be using Overleaf. Save money
|
||||
with Overleaf group and company-wide subscriptions. Request more
|
||||
information.
|
||||
</span>
|
||||
)
|
||||
case 'FOMO':
|
||||
return (
|
||||
<span>
|
||||
|
||||
@@ -408,7 +408,6 @@
|
||||
"details_provided_by_google_explanation": "Your details were provided by your Google account. Please check you’re happy with them.",
|
||||
"dictionary": "Dictionary",
|
||||
"did_you_know_institution_providing_professional": "Did you know that __institutionName__ is providing <0>free __appName__ Professional features</0> to everyone at __institutionName__?",
|
||||
"did_you_know_that_overleaf_offers": "Did you know that __appName__ offers group and organization-wide subscription options? Request information or a quote.",
|
||||
"disable_single_sign_on": "Disable single sign-on",
|
||||
"disable_sso": "Disable SSO",
|
||||
"disable_stop_on_first_error": "Disable “Stop on first error”",
|
||||
|
||||
@@ -805,7 +805,7 @@ describe('<UserNotifications />', function () {
|
||||
|
||||
window.metaAttributesCache.set(
|
||||
'ol-groupsAndEnterpriseBannerVariant',
|
||||
'did-you-know'
|
||||
'on-premise'
|
||||
)
|
||||
})
|
||||
|
||||
@@ -892,23 +892,6 @@ describe('<UserNotifications />', function () {
|
||||
localStorage.clear()
|
||||
})
|
||||
|
||||
it('will show the correct text for the `did-you-know` variant', async function () {
|
||||
window.metaAttributesCache.set(
|
||||
'ol-groupsAndEnterpriseBannerVariant',
|
||||
'did-you-know'
|
||||
)
|
||||
|
||||
renderWithinProjectListProvider(GroupsAndEnterpriseBanner)
|
||||
await fetchMock.flush(true)
|
||||
|
||||
screen.getByText(
|
||||
'Did you know that Overleaf offers group and organization-wide subscription options? Request information or a quote.'
|
||||
)
|
||||
const link = screen.getByRole('link', { name: 'Contact Sales' })
|
||||
|
||||
expect(link.getAttribute('href')).to.equal(`/for/contact-sales-1`)
|
||||
})
|
||||
|
||||
it('will show the correct text for the `on-premise` variant', async function () {
|
||||
window.metaAttributesCache.set(
|
||||
'ol-groupsAndEnterpriseBannerVariant',
|
||||
@@ -926,23 +909,6 @@ describe('<UserNotifications />', function () {
|
||||
expect(link.getAttribute('href')).to.equal(`/for/contact-sales-2`)
|
||||
})
|
||||
|
||||
it('will show the correct text for the `people` variant', async function () {
|
||||
window.metaAttributesCache.set(
|
||||
'ol-groupsAndEnterpriseBannerVariant',
|
||||
'people'
|
||||
)
|
||||
|
||||
renderWithinProjectListProvider(GroupsAndEnterpriseBanner)
|
||||
await fetchMock.flush(true)
|
||||
|
||||
screen.getByText(
|
||||
'Other people at your company may already be using Overleaf. Save money with Overleaf group and company-wide subscriptions. Request more information.'
|
||||
)
|
||||
const link = screen.getByRole('link', { name: 'Contact Sales' })
|
||||
|
||||
expect(link.getAttribute('href')).to.equal(`/for/contact-sales-3`)
|
||||
})
|
||||
|
||||
it('will show the correct text for the `FOMO` variant', async function () {
|
||||
window.metaAttributesCache.set(
|
||||
'ol-groupsAndEnterpriseBannerVariant',
|
||||
|
||||
Reference in New Issue
Block a user