📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
End landing page hero A/B test; update Hero section of error tracking & performance pages to match that
Blue Mouse7d9725fff4bc
diff --git a/web/app/components/marketing/LogoCloud.tsx b/web/app/components/marketing/LogoCloud.tsxindex 8c711bcf2..0e9a9368f 100644--- a/web/app/components/marketing/LogoCloud.tsx+++ b/web/app/components/marketing/LogoCloud.tsx@@ -1,6 +1,5 @@import { useTranslation } from 'react-i18next'-import { useTheme } from '~/providers/ThemeProvider'import { Text } from '~/ui/Text'import { cn } from '~/utils/generic'@@ -58,24 +57,14 @@ export const LOGOS: ImageLogo[] = [},]-type LogoCloudVariant = 'old' | 'new'--interface LogoCloudProps {- variant?: LogoCloudVariant-}--export const LogoCloud = ({ variant = 'new' }: LogoCloudProps) => {+export const LogoCloud = () => {const { t } = useTranslation('common')- const { theme } = useTheme()- const isNewVariant = variant === 'new'return (<sectionclassName={cn('rounded-b-4xl pt-14 pb-16',- isNewVariant- ? 'mx-2 -mt-px bg-slate-950 ring-1 ring-black/5 dark:ring-white/10'- : 'bg-gray-100/80 dark:bg-slate-900/50',+ 'mx-2 -mt-px bg-slate-950 ring-1 ring-black/5 dark:ring-white/10',)}><div className='mx-auto max-w-7xl px-4 sm:px-6 lg:px-8'>@@ -83,21 +72,16 @@ export const LogoCloud = ({ variant = 'new' }: LogoCloudProps) => {as='p'size='xs'weight='semibold'- colour={isNewVariant ? 'inherit' : 'muted'}+ colour={'inherit'}className={cn('text-center tracking-[0.18em] uppercase',- isNewVariant && 'text-gray-200',+ 'text-gray-200',)}>{t('main.logoCloud.title')}</Text>- <ul- className={cn(- 'mx-auto mt-10 grid grid-cols-2 items-center justify-items-center gap-x-8 gap-y-10 sm:grid-cols-3 sm:gap-x-12 lg:max-w-6xl lg:grid-cols-6 lg:gap-x-8',- isNewVariant ? 'max-w-6xl' : 'max-w-5xl',- )}- >+ <ul className='mx-auto mt-10 grid max-w-6xl grid-cols-2 items-center justify-items-center gap-x-8 gap-y-10 sm:grid-cols-3 sm:gap-x-12 lg:max-w-6xl lg:grid-cols-6 lg:gap-x-8'>{LOGOS.map((logo) => (<likey={logo.name}@@ -105,21 +89,12 @@ export const LogoCloud = ({ variant = 'new' }: LogoCloudProps) => {><imgalt={logo.name}- src={- isNewVariant- ? (logo.dark ?? logo.light)- : logo.dark && theme === 'dark'- ? logo.dark- : logo.light- }+ src={logo.dark ?? logo.light}loading='lazy'className={cn('w-auto max-w-[180px] object-contain',logo.heightClass,- !logo.dark &&- (isNewVariant- ? 'brightness-0 invert'- : 'dark:brightness-0 dark:invert'),+ !logo.dark && 'brightness-0 invert',)}/></li>diff --git a/web/app/components/marketing/ProductMarketingPage.tsx b/web/app/components/marketing/ProductMarketingPage.tsxnew file mode 100644index 000000000..46eed6282--- /dev/null+++ b/web/app/components/marketing/ProductMarketingPage.tsx@@ -0,0 +1,422 @@+import {+ ArrowRightIcon,+ CheckCircleIcon,+ CookieIcon,+ GaugeIcon,+ GithubLogoIcon,+ StarIcon,+} from '@phosphor-icons/react'+import { motion, useReducedMotion, useScroll, useTransform } from 'motion/react'+import { ClientOnly } from 'remix-utils/client-only'+import { Trans, useTranslation } from 'react-i18next'++import Header from '~/components/Header'+import useBreakpoint from '~/hooks/useBreakpoint'+import { localisePath } from '~/lib/constants'+import { useTheme } from '~/providers/ThemeProvider'+import Button from '~/ui/Button'+import { Link } from '~/ui/Link'+import { Text } from '~/ui/Text'+import { cn } from '~/utils/generic'+import routesPath from '~/utils/routes'++import { ScrollReveal } from './ScrollReveal'++type ProductMarketingVariant = 'errors' | 'performance'+type HeroTone = 'amber' | 'red'+type DemoTab = 'errors' | 'performance'++interface ProductHeroProps {+ backgroundSrc: string+ demoTab: DemoTab+ descriptionKey: string+ liveDemoUrl: string+ screenshotAlt: string+ screenshotDarkSrc: string+ screenshotLightSrc: string+ sloganKey: string+ tone: HeroTone+}++const HERO_TONES: Record<+ HeroTone,+ {+ highlight: string+ radial: string+ }+> = {+ amber: {+ highlight: 'text-amber-300',+ radial: 'from-amber-300/35 via-orange-950/10 to-slate-950/85',+ },+ red: {+ highlight: 'text-red-300',+ radial: 'from-red-400/35 via-red-950/10 to-slate-950/85',+ },+}++const SECTION_ACCENTS: Record<ProductMarketingVariant, string> = {+ errors: 'text-red-600 dark:text-red-400',+ performance: 'text-amber-600 dark:text-amber-400',+}++const HERO_BENEFITS = [+ {+ icon: GaugeIcon,+ labelKey: 'main.heroBenefits.quickSetup',+ },+ {+ icon: CookieIcon,+ labelKey: 'main.heroBenefits.cookieless',+ },+ {+ icon: StarIcon,+ labelKey: 'main.heroBenefits.realTimeDashboard',+ },+ {+ icon: GithubLogoIcon,+ labelKey: 'main.heroBenefits.openSource',+ },+] as const++const ProductHeroBackground = ({+ backgroundSrc,+}: {+ backgroundSrc: string+}) => {+ const reduceMotion = useReducedMotion()+ const { scrollY } = useScroll()+ const scale = useTransform(scrollY, [0, 900], [1, 1.08])++ return (+ <motion.div+ className='absolute inset-0 transform-gpu'+ style={+ reduceMotion ? undefined : { scale, transformOrigin: 'center 35%' }+ }+ >+ <img+ alt=''+ className='size-full object-cover object-center opacity-95 saturate-125'+ src={backgroundSrc}+ />+ </motion.div>+ )+}++const ProductHeroPreview = ({+ demoTab,+ screenshotAlt,+ screenshotDarkSrc,+ screenshotLightSrc,+}: Pick<+ ProductHeroProps,+ 'demoTab' | 'screenshotAlt' | 'screenshotDarkSrc' | 'screenshotLightSrc'+>) => {+ const { theme } = useTheme()+ const {+ i18n: { language },+ } = useTranslation('common')+ const isUpToLg = !useBreakpoint('lg')++ if (isUpToLg) {+ return (+ <ScrollReveal className='relative z-20 mx-auto mt-10 overflow-hidden rounded-2xl bg-white/80 p-1.5 shadow-2xl ring-1 shadow-slate-950/20 ring-white/40 backdrop-blur-md dark:bg-slate-950/80 dark:ring-white/10'>+ <img+ src={theme === 'dark' ? screenshotDarkSrc : screenshotLightSrc}+ className='relative h-auto w-full rounded-xl'+ width={2328}+ height={1666}+ alt={screenshotAlt}+ />+ </ScrollReveal>+ )+ }++ const localisedDemoPath = localisePath('/demo', language)++ return (+ <div+ className='relative z-20 mx-auto mt-12 w-full max-w-[1480px] overflow-hidden rounded-2xl bg-white/90 p-2 shadow-2xl ring-1 shadow-slate-950/25 ring-white/40 backdrop-blur-xl dark:bg-slate-950/90 dark:ring-white/10'+ style={{+ transform: 'translateZ(0)',+ WebkitTransform: 'translateZ(0)',+ willChange: 'transform',+ contain: 'paint',+ WebkitMaskImage: '-webkit-radial-gradient(white, black)',+ }}+ >+ <div className='relative h-[580px] overflow-hidden rounded-xl bg-slate-950 lg:h-[640px] xl:h-[700px]'>+ <iframe+ src={`https://swetrix.com${localisedDemoPath}?tab=${demoTab}&theme=${theme}&embedded=true`}+ className='size-full rounded-xl'+ title={`${screenshotAlt} Live Demo`}+ loading='eager'+ />+ </div>+ </div>+ )+}++export const ProductMarketingHero = ({+ backgroundSrc,+ demoTab,+ descriptionKey,+ liveDemoUrl,+ screenshotAlt,+ screenshotDarkSrc,+ screenshotLightSrc,+ sloganKey,+ tone,+}: ProductHeroProps) => {+ const { t } = useTranslation('common')+ const toneConfig = HERO_TONES[tone]++ return (+ <div className='relative isolate overflow-hidden bg-gray-50 pt-2 dark:bg-slate-950'>+ <div className='relative mx-2 overflow-hidden rounded-t-4xl bg-slate-950 shadow-2xl ring-1 shadow-slate-950/20 ring-black/5 dark:ring-white/10'>+ <div aria-hidden className='pointer-events-none absolute inset-0'>+ <ProductHeroBackground backgroundSrc={backgroundSrc} />+ <div className='absolute inset-0 bg-slate-950/50' />+ <div+ className={cn(+ 'absolute inset-0 bg-radial-[at_50%_0%]',+ toneConfig.radial,+ )}+ />+ <div className='absolute inset-x-0 bottom-0 h-1/3 bg-linear-to-b from-transparent to-slate-950' />+ </div>+ <Header transparent inverted />+ <section className='relative z-10 mx-auto flex max-w-[1500px] flex-col items-center px-4 pt-14 pb-6 sm:px-6 sm:pt-16 lg:px-8 lg:pt-20'>+ <div className='flex w-full flex-col items-center'>+ <Text+ as='h1'+ weight='semibold'+ className='mx-auto max-w-6xl text-center [font-family:Geist,ui-sans-serif,system-ui,sans-serif] text-5xl leading-[0.98] text-balance text-white sm:text-6xl lg:text-7xl xl:text-8xl'+ >+ <Trans+ t={t}+ i18nKey={sloganKey}+ components={{+ span: <span className={toneConfig.highlight} />,+ }}+ />+ </Text>+ <Text+ as='p'+ size='lg'+ className='mx-auto mt-5 max-w-3xl text-center leading-8 text-gray-50'+ >+ {t(descriptionKey)}+ </Text>+ <div className='mt-8 flex w-full flex-col items-stretch justify-center gap-3 sm:w-auto sm:flex-row sm:items-center'>+ <Link+ to={routesPath.signup}+ className='inline-flex h-12 items-center justify-center rounded-md bg-white px-5 text-slate-950 shadow-lg ring-1 shadow-slate-950/20 ring-white/30 transition-colors hover:bg-gray-100'+ aria-label={t('titles.signup')}+ >+ <span className='text-center text-base font-semibold'>+ {t('main.startAXDayFreeTrial', { amount: 14 })}+ </span>+ <ArrowRightIcon className='mt-[1px] ml-1 h-4 w-5' />+ </Link>+ <Button+ to={liveDemoUrl}+ linkProps={{+ target: '_blank',+ rel: 'noopener noreferrer',+ }}+ variant='secondary'+ size='xl'+ className='flex h-12 items-center justify-center border-white/25 bg-white/10 px-5 text-center text-base font-semibold text-white shadow-none ring-white/25 backdrop-blur-md hover:bg-white/20 dark:border-white/25 dark:bg-white/10 dark:text-white dark:hover:bg-white/20'+ aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}+ >+ {t('common.liveDemo')}+ </Button>+ </div>+ <div className='mt-8 flex max-w-4xl flex-wrap justify-center gap-x-16 gap-y-3 text-gray-50'>+ {HERO_BENEFITS.map(({ icon: Icon, labelKey }) => (+ <div+ key={labelKey}+ className='flex items-center gap-2 text-sm whitespace-nowrap'+ >+ <Icon className='size-5 shrink-0' />+ <span>{t(labelKey)}</span>+ </div>+ ))}+ </div>+ </div>+ <div className='w-full'>+ <ClientOnly+ fallback={+ <div className='mx-auto mt-12 h-[580px] w-full max-w-[1480px] rounded-2xl bg-white/10 ring-1 ring-white/20 backdrop-blur-xl lg:h-[640px] xl:h-[700px]' />+ }+ >+ {() => (+ <ProductHeroPreview+ demoTab={demoTab}+ screenshotAlt={screenshotAlt}+ screenshotDarkSrc={screenshotDarkSrc}+ screenshotLightSrc={screenshotLightSrc}+ />+ )}+ </ClientOnly>+ </div>+ </section>+ </div>+ </div>+ )+}++const FastDescription = ({ variant }: { variant: ProductMarketingVariant }) => {+ const { t } = useTranslation('common')++ if (variant === 'performance') {+ return (+ <Trans+ t={t}+ i18nKey='performance.fast.desc'+ components={{+ indexUrl: (+ <Link+ to={routesPath.main}+ className='font-medium text-amber-600 hover:underline dark:text-amber-400'+ />+ ),+ wpostatsUrl: (+ <a+ href='https://wpostats.com/?utm_source=swetrix.com'+ aria-label={t('ariaLabels.openWpoStats')}+ className='font-medium text-amber-600 hover:underline dark:text-amber-400'+ target='_blank'+ rel='noopener noreferrer'+ />+ ),+ }}+ />+ )+ }++ return (+ <Trans+ t={t}+ i18nKey='errors.fast.desc'+ components={{+ indexUrl: (+ <Link+ to={routesPath.main}+ className='font-medium text-red-600 hover:underline dark:text-red-400'+ />+ ),+ perfUrl: (+ <Link+ to={routesPath.performance}+ className='font-medium text-red-600 hover:underline dark:text-red-400'+ />+ ),+ oneLC: (+ <a+ href='https://swetrix.com/docs/swetrix-js-reference#trackerrors'+ aria-label={t('ariaLabels.openErrorTrackingDocumentation')}+ className='font-medium text-red-600 hover:underline dark:text-red-400'+ target='_blank'+ rel='noopener noreferrer'+ />+ ),+ }}+ />+ )+}++export const ProductMarketingSections = ({+ variant,+}: {+ variant: ProductMarketingVariant+}) => {+ const { t } = useTranslation('common')+ const accent = SECTION_ACCENTS[variant]+ const fastList = t(`${variant}.fast.list`, {+ returnObjects: true,+ }) as string[]+ const detailSections =+ variant === 'performance'+ ? [+ {+ title: t('performance.metrics.title'),+ desc: t('performance.metrics.desc'),+ },+ {+ title: t('performance.privacy.title'),+ desc: t('performance.privacy.desc'),+ },+ ]+ : [+ {+ title: t('errors.track.title'),+ desc: t('errors.track.desc'),+ },+ {+ title: t('performance.privacy.title'),+ desc: t('performance.privacy.desc'),+ },+ ]++ return (+ <section className='mx-auto max-w-7xl px-4 py-16 sm:py-20 lg:px-8'>+ <div className='grid gap-10 lg:grid-cols-[0.95fr_1.05fr] lg:gap-16'>+ <ScrollReveal>+ <Text as='h2' size='4xl' weight='bold' tracking='tight'>+ {t(`${variant}.fast.title`)}+ </Text>+ <Text+ as='p'+ size='base'+ colour='secondary'+ className='mt-5 max-w-2xl leading-8 whitespace-pre-line'+ >+ <FastDescription variant={variant} />+ </Text>+ </ScrollReveal>++ <ScrollReveal delay={0.08} className='lg:pt-1'>+ <ul className='divide-y divide-gray-200 border-y border-gray-200 dark:divide-slate-800 dark:border-slate-800'>+ {fastList.map((item) => (+ <li key={item} className='flex gap-3 py-4'>+ <CheckCircleIcon+ weight='fill'+ className={cn('mt-1 size-5 shrink-0', accent)}+ />+ <Text+ as='span'+ size='base'+ colour='secondary'+ className='leading-7'+ >+ {item}+ </Text>+ </li>+ ))}+ </ul>+ </ScrollReveal>+ </div>++ <div className='mt-16 grid gap-10 border-t border-gray-200 pt-12 lg:grid-cols-2 lg:gap-16 dark:border-slate-800'>+ {detailSections.map(({ title, desc }, index) => (+ <ScrollReveal key={title} delay={index * 0.08}>+ <Text as='h3' size='2xl' weight='bold' tracking='tight'>+ {title}+ </Text>+ <Text+ as='p'+ size='base'+ colour='secondary'+ className='mt-4 max-w-2xl leading-8 whitespace-pre-line'+ >+ {desc}+ </Text>+ </ScrollReveal>+ ))}+ </div>+ </section>+ )+}diff --git a/web/app/pages/ErrorTracking/index.tsx b/web/app/pages/ErrorTracking/index.tsxindex 40d065df9..dd2b5bd88 100644--- a/web/app/pages/ErrorTracking/index.tsx+++ b/web/app/pages/ErrorTracking/index.tsx@@ -1,201 +1,35 @@-import { ArrowRightIcon } from '@phosphor-icons/react'-import _map from 'lodash/map'-import { useTranslation, Trans } from 'react-i18next'-import { Link } from '~/ui/Link'--import Header from '~/components/Header'import { DitchGoogle } from '~/components/marketing/DitchGoogle'+import Integrations from '~/components/marketing/Integrations'import MarketingPricing from '~/components/pricing/MarketingPricing'import { ERROR_TRACKING_LIVE_DEMO_URL } from '~/lib/constants'-import { useTheme } from '~/providers/ThemeProvider'-import { Text } from '~/ui/Text'-import routesPath from '~/utils/routes'import { LogoCloud } from '~/components/marketing/LogoCloud'+import {+ ProductMarketingHero,+ ProductMarketingSections,+} from '~/components/marketing/ProductMarketingPage'import { FeedbackDual } from '~/routes/_index'const ErrorTracking = () => {- const { t } = useTranslation('common')- const { theme } = useTheme()-return (<div className='overflow-hidden'><main className='bg-gray-50 dark:bg-slate-950'>- <div className='relative isolate bg-gray-100/80 pt-2 dark:bg-slate-900/50'>- <div className='relative mx-2 overflow-hidden rounded-4xl'>- <div- aria-hidden- className='pointer-events-none absolute inset-0 -z-10'- >- <div className='absolute inset-0 rounded-4xl bg-linear-115 from-slate-100 from-28% via-red-400 via-75% to-red-700 opacity-50 ring-1 ring-black/5 ring-inset sm:bg-linear-145 dark:from-slate-950 dark:opacity-45 dark:ring-white/10' />- </div>- <Header transparent />- <section className='mx-auto max-w-7xl px-4 pt-10 pb-5 sm:px-3 lg:grid lg:grid-cols-12 lg:gap-8 lg:px-6 lg:pt-20 xl:px-8'>- <div className='z-20 col-span-6 flex flex-col items-start'>- <Text- as='h1'- size='4xl'- weight='semibold'- tracking='tight'- className='max-w-5xl text-left text-pretty sm:text-5xl sm:leading-none lg:mt-6 lg:text-6xl xl:text-7xl'- >- <Trans- t={t}- i18nKey='errors.slogan'- components={{- span: <span className='text-red-700 dark:text-red-400' />,- }}- />- </Text>- <Text as='p' size='lg' className='mt-4 max-w-2xl text-left'>- {t('errors.description')}- </Text>- <div className='mt-8 flex flex-col items-stretch sm:flex-row sm:items-center'>- <Link- to={routesPath.signup}- className='flex h-12 items-center justify-center rounded-md border-2 border-slate-900 bg-slate-900 px-4 text-white transition-all hover:bg-transparent hover:text-slate-900 dark:border-slate-50 dark:bg-gray-50 dark:text-slate-900 dark:hover:text-gray-50'- aria-label={t('titles.signup')}- >- <span className='mr-1 text-center text-base font-semibold'>- {t('main.startAXDayFreeTrial', { amount: 14 })}- </span>- <ArrowRightIcon className='mt-[1px] h-4 w-5' />- </Link>- </div>- </div>- <div className='col-span-6 mt-10 overflow-visible lg:mt-0 lg:mr-0 lg:ml-4'>- <div className='relative z-20 mx-auto mt-10 overflow-hidden rounded-xl ring-2 ring-gray-900/10 lg:hidden dark:ring-white/10'>- <img- src={- theme === 'dark'- ? '/assets/screenshot_errors_dark.png'- : '/assets/screenshot_errors_light.png'- }- className='relative w-full'- width='100%'- height='auto'- alt='Swetrix Analytics dashboard'- />- <div className='absolute inset-0 flex items-center justify-center bg-slate-900/20 opacity-100 backdrop-blur-[1px] transition-opacity duration-200'>- <a- href={ERROR_TRACKING_LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('common.liveDemo')}- </a>- </div>- </div>- <div className='group relative -mr-6 hidden w-[140%] overflow-hidden rounded-2xl bg-white shadow-lg ring-1 ring-black/5 transition-shadow ease-out hover:ring-gray-300/80 sm:-mr-12 sm:w-[160%] lg:-mr-16 lg:block lg:w-[180%] xl:-mr-24 2xl:-mr-32 dark:bg-slate-800 dark:ring-white/10 dark:hover:ring-white/20'>- <div className='relative h-[580px] lg:h-[640px] xl:h-[700px]'>- <img- src={- theme === 'dark'- ? '/assets/screenshot_errors_dark.png'- : '/assets/screenshot_errors_light.png'- }- className='size-full object-cover object-left'- alt='Swetrix Error Tracking'- />- <div className='pointer-events-auto absolute inset-0 flex items-center justify-center bg-slate-900/20 opacity-100 backdrop-blur-[1px] transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100 lg:pointer-events-none lg:bg-slate-900/40 lg:opacity-0 lg:backdrop-blur-[2px]'>- <a- href={ERROR_TRACKING_LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('common.liveDemo')}- </a>- </div>- </div>- </div>- </div>- </section>- </div>- </div>+ <ProductMarketingHero+ backgroundSrc='/assets/error-tracking-hero-background.webp'+ demoTab='errors'+ descriptionKey='errors.description'+ liveDemoUrl={ERROR_TRACKING_LIVE_DEMO_URL}+ screenshotAlt='Swetrix Error Tracking'+ screenshotDarkSrc='/assets/screenshot_errors_dark.png'+ screenshotLightSrc='/assets/screenshot_errors_light.png'+ sloganKey='errors.slogan'+ tone='red'+ /><LogoCloud />- <div className='mx-auto mt-12 max-w-7xl bg-white px-4 pb-16 whitespace-pre-line dark:bg-slate-950'>- <Text as='h2' size='4xl' weight='bold' tracking='tight'>- {t('errors.fast.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- <Trans- t={t}- i18nKey='errors.fast.desc'- components={{- indexUrl: (- <Link- to={routesPath.main}- className='font-medium text-red-600 hover:underline dark:text-red-400'- />- ),-- perfUrl: (- <Link- to={routesPath.performance}- className='font-medium text-red-600 hover:underline dark:text-red-400'- />- ),- oneLC: (- <a- href='https://swetrix.com/docs/swetrix-js-reference#trackerrors'- aria-label={t('ariaLabels.openErrorTrackingDocumentation')}- className='font-medium text-red-600 hover:underline dark:text-red-400'- target='_blank'- rel='noopener noreferrer'- />- ),- }}- />- </Text>- <ul className='mt-2 list-inside list-disc'>- {_map(- t('errors.fast.list', { returnObjects: true }),- (item, idx) => (- <Text- as='li'- size='lg'- key={`error-fast-${idx}`}- className='mb-2'- >- {item}- </Text>- ),- )}- </ul>-- <Text- as='h2'- size='4xl'- weight='bold'- tracking='tight'- className='mt-10'- >- {t('errors.track.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- {t('errors.track.desc')}- </Text>+ <ProductMarketingSections variant='errors' />- <Text- as='h2'- size='4xl'- weight='bold'- tracking='tight'- className='mt-10'- >- {t('performance.privacy.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- {t('performance.privacy.desc')}- </Text>- </div>+ <Integrations /><MarketingPricing />diff --git a/web/app/pages/Performance/index.tsx b/web/app/pages/Performance/index.tsxindex 2e57e66fb..9e15c92a6 100644--- a/web/app/pages/Performance/index.tsx+++ b/web/app/pages/Performance/index.tsx@@ -1,192 +1,35 @@-import { ArrowRightIcon } from '@phosphor-icons/react'-import _map from 'lodash/map'-import { useTranslation, Trans } from 'react-i18next'-import { Link } from '~/ui/Link'--import Header from '~/components/Header'import { DitchGoogle } from '~/components/marketing/DitchGoogle'+import Integrations from '~/components/marketing/Integrations'import MarketingPricing from '~/components/pricing/MarketingPricing'import { PERFORMANCE_LIVE_DEMO_URL } from '~/lib/constants'-import { useTheme } from '~/providers/ThemeProvider'-import { Text } from '~/ui/Text'-import routesPath from '~/utils/routes'import { LogoCloud } from '~/components/marketing/LogoCloud'+import {+ ProductMarketingHero,+ ProductMarketingSections,+} from '~/components/marketing/ProductMarketingPage'import { FeedbackDual } from '~/routes/_index'const Performance = () => {- const { t } = useTranslation('common')- const { theme } = useTheme()-return (<div className='overflow-hidden'><main className='bg-gray-50 dark:bg-slate-950'>- <div className='relative isolate bg-gray-100/80 pt-2 dark:bg-slate-900/50'>- <div className='relative mx-2 overflow-hidden rounded-4xl'>- <div- aria-hidden- className='pointer-events-none absolute inset-0 -z-10'- >- <div className='absolute inset-0 rounded-4xl bg-linear-115 from-slate-100 from-28% via-orange-400 via-70% to-orange-700 opacity-50 ring-1 ring-black/5 ring-inset sm:bg-linear-145 dark:from-slate-950 dark:opacity-45 dark:ring-white/10' />- </div>- <Header transparent />- <section className='mx-auto max-w-7xl px-4 pt-10 pb-5 sm:px-3 lg:grid lg:grid-cols-12 lg:gap-8 lg:px-6 lg:pt-20 xl:px-8'>- <div className='z-20 col-span-6 flex flex-col items-start'>- <Text- as='h1'- size='4xl'- weight='semibold'- tracking='tight'- className='max-w-5xl text-left text-pretty sm:text-5xl sm:leading-none lg:mt-6 lg:text-6xl xl:text-7xl'- >- <Trans- t={t}- i18nKey='performance.slogan'- components={{- span: (- <span className='text-orange-700 dark:text-orange-400' />- ),- }}- />- </Text>- <Text as='p' size='lg' className='mt-4 max-w-2xl text-left'>- {t('performance.description')}- </Text>- <div className='mt-8 flex flex-col items-stretch sm:flex-row sm:items-center'>- <Link- to={routesPath.signup}- className='flex h-12 items-center justify-center rounded-md border-2 border-slate-900 bg-slate-900 px-4 text-white transition-all hover:bg-transparent hover:text-slate-900 dark:border-slate-50 dark:bg-gray-50 dark:text-slate-900 dark:hover:text-gray-50'- aria-label={t('titles.signup')}- >- <span className='mr-1 text-center text-base font-semibold'>- {t('main.startAXDayFreeTrial', { amount: 14 })}- </span>- <ArrowRightIcon className='mt-[1px] h-4 w-5' />- </Link>- </div>- </div>- <div className='col-span-6 mt-10 overflow-visible lg:mt-0 lg:mr-0 lg:ml-4'>- <div className='relative z-20 mx-auto mt-10 overflow-hidden rounded-xl ring-2 ring-gray-900/10 lg:hidden dark:ring-white/10'>- <img- src={- theme === 'dark'- ? '/assets/screenshot_perf_dark.png'- : '/assets/screenshot_perf_light.png'- }- className='relative w-full'- width='100%'- height='auto'- alt='Swetrix Analytics dashboard'- />- <div className='absolute inset-0 flex items-center justify-center bg-slate-900/20 opacity-100 backdrop-blur-[1px] transition-opacity duration-200'>- <a- href={PERFORMANCE_LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('common.liveDemo')}- </a>- </div>- </div>- <div className='group relative -mr-6 hidden w-[140%] overflow-hidden rounded-2xl bg-white shadow-lg ring-1 ring-black/5 transition-shadow ease-out hover:ring-gray-300/80 sm:-mr-12 sm:w-[160%] lg:-mr-16 lg:block lg:w-[180%] xl:-mr-24 2xl:-mr-32 dark:bg-slate-800 dark:ring-white/10 dark:hover:ring-white/20'>- <div className='relative h-[580px] lg:h-[640px] xl:h-[700px]'>- <img- src={- theme === 'dark'- ? '/assets/screenshot_perf_dark.png'- : '/assets/screenshot_perf_light.png'- }- className='size-full object-cover object-left'- alt='Swetrix Analytics dashboard'- />- <div className='pointer-events-auto absolute inset-0 flex items-center justify-center bg-slate-900/20 opacity-100 backdrop-blur-[1px] transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100 lg:pointer-events-none lg:bg-slate-900/40 lg:opacity-0 lg:backdrop-blur-[2px]'>- <a- href={PERFORMANCE_LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('common.liveDemo')}- </a>- </div>- </div>- </div>- </div>- </section>- </div>- </div>+ <ProductMarketingHero+ backgroundSrc='/assets/performance-hero-background.webp'+ demoTab='performance'+ descriptionKey='performance.description'+ liveDemoUrl={PERFORMANCE_LIVE_DEMO_URL}+ screenshotAlt='Swetrix Performance Monitoring'+ screenshotDarkSrc='/assets/screenshot_perf_dark.png'+ screenshotLightSrc='/assets/screenshot_perf_light.png'+ sloganKey='performance.slogan'+ tone='amber'+ /><LogoCloud />- <div className='mx-auto mt-12 max-w-7xl bg-white px-4 pb-16 whitespace-pre-line dark:bg-slate-950'>- <Text as='h2' size='4xl' weight='bold' tracking='tight'>- {t('performance.fast.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- <Trans- t={t}- i18nKey='performance.fast.desc'- components={{- indexUrl: (- <Link- to={routesPath.main}- className='font-medium text-orange-600 hover:underline dark:text-orange-400'- />- ),-- wpostatsUrl: (- <a- href='https://wpostats.com/?utm_source=swetrix.com'- aria-label={t('ariaLabels.openWpoStats')}- className='font-medium text-orange-600 hover:underline dark:text-orange-400'- target='_blank'- rel='noopener noreferrer'- />- ),- }}- />- </Text>- <ul className='mt-2 list-inside list-disc'>- {_map(- t('performance.fast.list', { returnObjects: true }),- (item) => (- <Text as='li' size='lg' key={item} className='mb-2'>- {item}- </Text>- ),- )}- </ul>-- <Text- as='h2'- size='4xl'- weight='bold'- tracking='tight'- className='mt-10'- >- {t('performance.metrics.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- {t('performance.metrics.desc')}- </Text>+ <ProductMarketingSections variant='performance' />- <Text- as='h2'- size='4xl'- weight='bold'- tracking='tight'- className='mt-10'- >- {t('performance.privacy.title')}- </Text>- <Text as='p' size='lg' className='mt-6'>- {t('performance.privacy.desc')}- </Text>- </div>+ <Integrations /><MarketingPricing />diff --git a/web/app/routes/_index.tsx b/web/app/routes/_index.tsxindex ea41f0bd7..9768c4bb6 100644--- a/web/app/routes/_index.tsx+++ b/web/app/routes/_index.tsx@@ -2,8 +2,6 @@ import NumberFlow from '@number-flow/react'import _map from 'lodash/map'import {CookieIcon,- HardDrivesIcon,- DatabaseIcon,GaugeIcon,GithubLogoIcon,ArrowRightIcon,@@ -48,7 +46,6 @@ import { LogoCloud } from '~/components/marketing/LogoCloud'import { ScrollReveal } from '~/components/marketing/ScrollReveal'import { WhySwitch } from '~/components/marketing/WhySwitch'import { Text } from '~/ui/Text'-import { getExperimentVariant } from '~/utils/analytics.server'export const meta: MetaFunction = () => {// eslint-disable-next-line react-hooks/rules-of-hooks@@ -66,43 +63,18 @@ export const sitemap: SitemapFunction = () => ({exclude: isSelfhosted || isDisableMarketingPages,})-const DEFAULT_LANDING_HERO_EXPERIMENT_ID = 'landing-page-hero-redesign'-const OLD_LANDING_HERO_VARIANT = 'old'-const NEW_LANDING_HERO_VARIANT = 'new'--type LandingHeroVariant =- | typeof OLD_LANDING_HERO_VARIANT- | typeof NEW_LANDING_HERO_VARIANT--const getLandingHeroVariant = (variant: string | null): LandingHeroVariant => {- return variant === NEW_LANDING_HERO_VARIANT- ? NEW_LANDING_HERO_VARIANT- : OLD_LANDING_HERO_VARIANT-}-export async function loader({ request }: LoaderFunctionArgs) {if (isSelfhosted || isDisableMarketingPages) {return redirect('/login', 302)}-- const landingHeroExperimentId =- process.env.LANDING_HERO_EXPERIMENT_ID || DEFAULT_LANDING_HERO_EXPERIMENT_ID-- const [metainfoResult, stats, landingHeroExperimentVariant] =- await Promise.all([- serverFetch<Metainfo>(request, 'user/metainfo', { skipAuth: true }),- getGeneralStats(request),- getExperimentVariant(- request,- landingHeroExperimentId,- OLD_LANDING_HERO_VARIANT,- ),- ])+ const [metainfoResult, stats] = await Promise.all([+ serverFetch<Metainfo>(request, 'user/metainfo', { skipAuth: true }),+ getGeneralStats(request),+ ])return {metainfo: metainfoResult.data ?? DEFAULT_METAINFO,stats,- landingHeroVariant: getLandingHeroVariant(landingHeroExperimentVariant),}}@@ -360,84 +332,7 @@ const Testimonials = ({)}-const OldLiveDemoPreview = () => {- const { t } = useTranslation('common')- const { theme } = useTheme()- const {- i18n: { language },- } = useTranslation('common')-- const isUpToLg = !useBreakpoint('lg')-- if (isUpToLg) {- return (- <div className='relative z-20 mx-auto mt-10 overflow-hidden rounded-xl ring-2 ring-gray-900/10 dark:ring-white/10'>- <img- src={- theme === 'dark'- ? '/assets/screenshot_dark.png'- : '/assets/screenshot_light.png'- }- className='relative h-auto w-full'- width={2328}- height={1666}- alt='Swetrix Analytics dashboard'- />- <div className='absolute inset-0 flex items-center justify-center bg-slate-900/20 opacity-100 backdrop-blur-[1px] transition-opacity duration-200'>- <a- href={LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('common.liveDemo')}- </a>- </div>- </div>- )- }-- const localisedDemoPath = localisePath('/demo', language)-- return (- <div- className='group relative -mr-6 ml-auto w-[140%] overflow-hidden rounded-2xl bg-gray-50 shadow-lg ring-1 ring-black/5 transition-shadow ease-out sm:-mr-12 sm:w-[160%] lg:-mr-16 lg:w-[180%] xl:-mr-24 2xl:-mr-32 dark:bg-slate-950 dark:ring-white/10'- style={{- transform: 'translateZ(0)',- WebkitTransform: 'translateZ(0)',- willChange: 'transform',- contain: 'paint',- WebkitMaskImage: '-webkit-radial-gradient(white, black)',- }}- >- <div className='pointer-events-none relative h-[580px] overflow-hidden rounded-2xl lg:h-[640px] xl:h-[700px]'>- <iframe- src={`https://swetrix.com${localisedDemoPath}?tab=traffic&theme=${theme}&embedded=true`}- className='size-full rounded-2xl'- title='Swetrix Analytics Live Demo'- style={{ pointerEvents: 'none' }}- tabIndex={-1}- />- <div className='pointer-events-none absolute inset-0 flex items-center justify-center rounded-2xl bg-slate-900/40 opacity-0 backdrop-blur-[2px] transition-opacity duration-200 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100'>- <a- href={LIVE_DEMO_URL}- target='_blank'- rel='noopener noreferrer'- className='pointer-events-auto inline-flex items-center rounded-md bg-white px-4 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-black/10 transition-all hover:bg-gray-50 dark:bg-slate-950 dark:text-white dark:ring-white/10 dark:hover:bg-slate-900'- aria-label={`${t('main.seeLiveDemo')} (opens in a new tab)`}- >- <ArrowRightIcon className='mr-2 h-4 w-4' />- {t('main.seeLiveDemo')}- </a>- </div>- </div>- </div>- )-}--const NewLiveDemoPreview = () => {+const LiveDemoPreview = () => {const { theme } = useTheme()const {i18n: { language },@@ -488,85 +383,6 @@ const NewLiveDemoPreview = () => {)}-const OldHero = ({ stats }: { stats: Stats | null }) => {- const { t } = useTranslation('common')-- return (- <div className='relative isolate bg-gray-100/80 pt-2 dark:bg-slate-900/50'>- <div className='relative mx-2 overflow-hidden rounded-4xl'>- <div aria-hidden className='pointer-events-none absolute inset-0 -z-10'>- <div className='absolute inset-0 rounded-4xl bg-linear-115 from-slate-100 from-28% via-purple-500 via-70% to-indigo-600 opacity-50 ring-1 ring-black/5 ring-inset sm:bg-linear-145 dark:from-slate-950 dark:opacity-45 dark:ring-white/10' />- </div>- <Header transparent />- <section className='mx-auto max-w-7xl px-4 pt-10 pb-5 sm:px-3 lg:grid lg:grid-cols-12 lg:gap-8 lg:px-6 lg:pt-20 xl:px-8'>- <div className='z-20 col-span-6 flex flex-col items-start'>- <Text- as='h1'- weight='semibold'- tracking='tight'- className='max-w-5xl text-left text-5xl text-pretty sm:leading-none lg:mt-6 lg:text-6xl xl:text-7xl'- >- {t('main.slogan')}- </Text>- <Text as='p' size='lg' className='mt-4 max-w-2xl text-left'>- {t('main.description')}- </Text>- <div className='mt-8 flex flex-col items-stretch sm:flex-row sm:items-center'>- <Link- to={routesPath.signup}- className='flex h-12 items-center justify-center rounded-md border-2 border-slate-900 bg-slate-900 px-4 text-white transition-all hover:bg-transparent hover:text-slate-900 dark:border-slate-50 dark:bg-gray-50 dark:text-slate-900 dark:hover:text-gray-50'- aria-label={t('titles.signup')}- >- <span className='mr-1 text-center text-base font-semibold'>- {t('main.startAXDayFreeTrial', { amount: 14 })}- </span>- <ArrowRightIcon className='mt-[1px] h-4 w-5' />- </Link>- </div>- <div className='mt-8 grid w-full grid-cols-2 gap-3 text-slate-900 dark:text-gray-50'>- <div className='flex items-center gap-3 text-sm'>- <StarIcon className='size-5' />- <span>{t('main.heroBenefits.trial', { days: 14 })}</span>- </div>- <div className='flex items-center gap-3 text-sm'>- <GaugeIcon className='size-5' />- <span>{t('main.heroBenefits.quickSetup')}</span>- </div>- <div className='flex items-center gap-3 text-sm'>- <CookieIcon className='size-5' />- <span>{t('main.heroBenefits.cookieless')}</span>- </div>- <div className='flex items-center gap-3 text-sm'>- <GithubLogoIcon className='size-5' />- <span>{t('main.heroBenefits.openSource')}</span>- </div>- <div className='flex items-center gap-3 text-sm'>- <DatabaseIcon className='size-5' />- <span>{t('main.heroBenefits.dataOwnership')}</span>- </div>- <div className='flex items-center gap-3 text-sm'>- <HardDrivesIcon className='size-5' />- <span>{t('main.heroBenefits.selfHostable')}</span>- </div>- </div>- <Testimonials className='mt-8 hidden lg:block' stats={stats} />- </div>- <div className='col-span-6 mt-10 overflow-visible lg:mt-0 lg:mr-0 lg:ml-4'>- <ClientOnly- fallback={- <div className='h-[240px] w-full rounded-2xl bg-slate-800/10 ring-1 ring-black/5 sm:h-[320px] md:h-[580px] lg:h-[640px] xl:h-[700px] dark:bg-slate-800/20 dark:ring-white/10' />- }- >- {() => <OldLiveDemoPreview />}- </ClientOnly>- </div>- <Testimonials className='mt-8 lg:hidden' stats={stats} />- </section>- </div>- </div>- )-}-const HeroParallaxBackground = () => {const reduceMotion = useReducedMotion()const { scrollY } = useScroll()@@ -591,7 +407,8 @@ const HeroParallaxBackground = () => {)}-const NewHero = ({ stats }: { stats: Stats | null }) => {+const Hero = () => {+ const { stats } = useLoaderData<typeof loader>()const { t } = useTranslation('common')return (@@ -671,7 +488,7 @@ const NewHero = ({ stats }: { stats: Stats | null }) => {<div className='mx-auto mt-12 h-[580px] w-full max-w-[1480px] rounded-2xl bg-white/10 ring-1 ring-white/20 backdrop-blur-xl lg:h-[640px] xl:h-[700px]' />}>- {() => <NewLiveDemoPreview />}+ {() => <LiveDemoPreview />}</ClientOnly></div></section>@@ -680,16 +497,6 @@ const NewHero = ({ stats }: { stats: Stats | null }) => {)}-const Hero = ({ variant }: { variant: LandingHeroVariant }) => {- const { stats } = useLoaderData<typeof loader>()-- if (variant === NEW_LANDING_HERO_VARIANT) {- return <NewHero stats={stats} />- }-- return <OldHero stats={stats} />-}-const SOFTWARE_APPLICATION_JSONLD = {'@context': 'https://schema.org','@type': 'SoftwareApplication',@@ -734,14 +541,14 @@ const SOFTWARE_APPLICATION_JSONLD = {}export default function Index() {- const { landingHeroVariant, metainfo } = useLoaderData<typeof loader>()+ const { metainfo } = useLoaderData<typeof loader>()return (<div className='overflow-hidden'><main className='bg-gray-50 dark:bg-slate-950'>- <Hero variant={landingHeroVariant} />+ <Hero />- <LogoCloud variant={landingHeroVariant} />+ <LogoCloud /><FeaturesGrid />diff --git a/web/knip.jsonc b/web/knip.jsoncindex 9998be0e6..941da62d1 100644--- a/web/knip.jsonc+++ b/web/knip.jsonc@@ -6,11 +6,11 @@"tailwindcss","rrweb","dom-player",- // "@swetrix/node",+ "@swetrix/node",+ ],+ "ignore": [+ "./app/utils/analytics.server.ts",],- // "ignore": [- // "./app/utils/analytics.server.ts",- // ],"project": ["./app/**/*.{js,ts,tsx,jsx,cjs}"],"paths": {"~/*": ["./app/*"],diff --git a/web/public/assets/error-tracking-hero-background.webp b/web/public/assets/error-tracking-hero-background.webpnew file mode 100644index 000000000..035d211f2Binary files /dev/null and b/web/public/assets/error-tracking-hero-background.webp differdiff --git a/web/public/assets/performance-hero-background.webp b/web/public/assets/performance-hero-background.webpnew file mode 100644index 000000000..7722827faBinary files /dev/null and b/web/public/assets/performance-hero-background.webp differ