Skip to content

📈 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!

Show more product value during the checkout onboarding step

Blue Mouse570fc561ded8
diff --git a/web/app/components/pricing/MarketingPricing.tsx b/web/app/components/pricing/MarketingPricing.tsx
index 475211487..0b8286840 100644
--- a/web/app/components/pricing/MarketingPricing.tsx
+++ b/web/app/components/pricing/MarketingPricing.tsx
@@ -34,7 +34,7 @@ import {
} from '@phosphor-icons/react'
import NumberFlow, { NumberFlowGroup } from '@number-flow/react'
import type { TFunction } from 'i18next'
-import { useMemo, useState } from 'react'
+import { useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { FLOW_VALUE_CLASS } from '~/hooks/useFlowValue'
@@ -66,6 +66,7 @@ import SessionReplayPricingTooltip from './SessionReplayPricingTooltip'
interface MarketingPricingProps {
metainfo?: Metainfo
onSelectPlan?: (selection: MarketingPricingSelection) => void
+ onSelectionChange?: (selection: MarketingPricingContext) => void
getActionLabel?: (selection: MarketingPricingSelection) => string
loadingPlanType?: PlanTypeCode | null
disabled?: boolean
@@ -79,6 +80,14 @@ export interface MarketingPricingSelection {
currency: CurrencyCode
}
+export interface MarketingPricingContext {
+ eventTier: EventTierCode
+ monthlyEvents: number
+ isCustomEventTier: boolean
+ billingFrequency: BillingInterval
+ currency: CurrencyCode
+}
+
interface BenefitTooltip {
description: string
href?: string
@@ -189,7 +198,10 @@ const getBenefits = (planType: PlanTypeCode, t: TFunction): Benefit[] => {
if (planType === 'standard') {
return [
{ icon: GlobeIcon, label: t('pricing.websiteCount', { count: 10 }) },
- { icon: UsersThreeIcon, label: t('pricing.benefits.unlimitedMembers') },
+ {
+ icon: UsersThreeIcon,
+ label: t('pricing.teamMemberCount', { count: 10 }),
+ },
benefitWithTooltip(
DownloadSimpleIcon,
'pricing.benefits.googleAnalyticsImport',
@@ -283,6 +295,10 @@ const getBenefits = (planType: PlanTypeCode, t: TFunction): Benefit[] => {
})}`,
},
},
+ {
+ icon: UsersThreeIcon,
+ label: t('pricing.teamMemberCount', { count: 25 }),
+ },
{
icon: MonitorPlayIcon,
label: t('pricing.benefits.sessionReplays'),
@@ -459,6 +475,7 @@ const BillingFrequencySwitch = ({ checked }: { checked: boolean }) => (
export const PricingInternal = ({
metainfo = DEFAULT_METAINFO,
onSelectPlan,
+ onSelectionChange,
getActionLabel,
loadingPlanType,
disabled,
@@ -490,6 +507,23 @@ export const PricingInternal = ({
}`
const isYearly = billingFrequency === 'yearly'
+ useEffect(() => {
+ onSelectionChange?.({
+ eventTier: selectedTier,
+ monthlyEvents: selectedMonthlyEvents,
+ isCustomEventTier,
+ billingFrequency,
+ currency: currencyCode,
+ })
+ }, [
+ billingFrequency,
+ currencyCode,
+ isCustomEventTier,
+ onSelectionChange,
+ selectedMonthlyEvents,
+ selectedTier,
+ ])
+
const sliderPercent = useMemo(() => {
if (eventTierOptionLabels.length <= 1) return 0
return (selectedTierIndex / (eventTierOptionLabels.length - 1)) * 100
@@ -892,6 +926,7 @@ export const PricingInternal = ({
const MarketingPricing = ({
metainfo = DEFAULT_METAINFO,
onSelectPlan,
+ onSelectionChange,
getActionLabel,
loadingPlanType,
disabled,
@@ -925,6 +960,7 @@ const MarketingPricing = ({
<PricingInternal
metainfo={metainfo}
onSelectPlan={onSelectPlan}
+ onSelectionChange={onSelectionChange}
getActionLabel={getActionLabel}
loadingPlanType={loadingPlanType}
disabled={disabled}
diff --git a/web/app/components/pricing/PricingComparisonTable.tsx b/web/app/components/pricing/PricingComparisonTable.tsx
index 861332e7d..7de9ac029 100644
--- a/web/app/components/pricing/PricingComparisonTable.tsx
+++ b/web/app/components/pricing/PricingComparisonTable.tsx
@@ -79,11 +79,11 @@ const getCategories = (t: TFunction): FeatureCategory[] => [
],
},
{
- label: t('pricing.benefits.unlimitedMembers'),
+ label: t('pricing.comparison.features.teamMembers'),
values: [
- { key: 'pricing.comparison.values.unlimited' },
- { key: 'pricing.comparison.values.unlimited' },
- { key: 'pricing.comparison.values.unlimited' },
+ { key: 'pricing.comparison.values.teamMembersStandard' },
+ { key: 'pricing.comparison.values.teamMembersPlus' },
+ { key: 'pricing.custom' },
],
},
{
diff --git a/web/app/pages/Subscribe/Subscribe.tsx b/web/app/pages/Subscribe/Subscribe.tsx
index 221caf340..b94f1f806 100644
--- a/web/app/pages/Subscribe/Subscribe.tsx
+++ b/web/app/pages/Subscribe/Subscribe.tsx
@@ -1,4 +1,5 @@
import type { TFunction } from 'i18next'
+import { ArrowUpIcon, CheckCircleIcon } from '@phosphor-icons/react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useFetcher, useLoaderData, useNavigate } from 'react-router'
@@ -6,6 +7,7 @@ import { toast } from 'sonner'
import {
PricingInternal,
+ type MarketingPricingContext,
type MarketingPricingSelection,
} from '~/components/pricing/MarketingPricing'
import { usePaddle } from '~/hooks/usePaddle'
@@ -20,11 +22,16 @@ import { useTheme } from '~/providers/ThemeProvider'
import type { SubscribeLoaderData } from '~/routes/subscribe'
import type { UserSettingsActionData } from '~/routes/user-settings'
import Alert from '~/ui/Alert'
+import Button from '~/ui/Button'
import { FAQ } from '~/ui/FAQ'
import { Text } from '~/ui/Text'
import { getRevenueAttribution, trackCustom } from '~/utils/analytics'
import routes from '~/utils/routes'
+import { SubscribeFeatures } from './SubscribeFeatures'
+import { SubscribeIncluded } from './SubscribeIncluded'
+import { SubscribeProof } from './SubscribeProof'
+import { SubscribeRating } from './SubscribeRating'
import { TrialTimeline } from './TrialTimeline'
type PayLinkResponse = {
@@ -53,10 +60,12 @@ const Subscribe = () => {
const { theme } = useTheme()
const { user, loadUser } = useAuth()
const navigate = useNavigate()
- const { metainfo } = useLoaderData<SubscribeLoaderData>()
+ const { metainfo, stats } = useLoaderData<SubscribeLoaderData>()
const [selectionLoading, setSelectionLoading] =
useState<MarketingPricingSelection | null>(null)
+ const [pricingContext, setPricingContext] =
+ useState<MarketingPricingContext | null>(null)
const [hasCompletedCheckout, setHasCompletedCheckout] = useState(false)
const checkoutInProgressRef = useRef(false)
@@ -240,58 +249,73 @@ const Subscribe = () => {
}
const faqItems = useMemo(() => {
- const faqValues = {
- lowestPlanEventsAmount:
- EVENT_TIERS['100k'].monthlyEvents.toLocaleString('en-US'),
- moderatePlanEventsAmount:
- EVENT_TIERS['500k'].monthlyEvents.toLocaleString('en-US'),
- }
-
- const reusedItems = [0, 1, 4].map((idx) => ({
+ return Array.from({ length: 7 }, (_, index) => ({
question: (
- <Trans t={t} i18nKey={`main.faq.items.${idx}.q`} values={faqValues} />
+ <Trans
+ t={t}
+ i18nKey={`checkout.faq.items.${index}.q`}
+ values={{ days: TRIAL_DAYS }}
+ />
),
answer: (
- <Trans t={t} i18nKey={`main.faq.items.${idx}.a`} values={faqValues} />
+ <Trans
+ t={t}
+ i18nKey={`checkout.faq.items.${index}.a`}
+ values={{ days: TRIAL_DAYS }}
+ />
),
}))
-
- return [
- {
- question: <Trans t={t} i18nKey='checkout.faqTrial.q' />,
- answer: (
- <Trans
- t={t}
- i18nKey='checkout.faqTrial.a'
- values={{ days: TRIAL_DAYS }}
- />
- ),
- },
- ...reusedItems,
- ]
}, [t])
+ const scrollToPricing = () => {
+ trackCustom('SUBSCRIBE_BOTTOM_CTA')
+ const pricing = document.getElementById('start-trial')
+
+ if (!pricing) return
+
+ pricing.focus({ preventScroll: true })
+ pricing.scrollIntoView({
+ behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches
+ ? 'auto'
+ : 'smooth',
+ block: 'start',
+ })
+ }
+
return (
<>
<main className='min-h-min-footer bg-gray-50 pb-16 dark:bg-slate-950'>
- <div className='mx-auto max-w-3xl px-4 pt-10 text-center sm:px-6 lg:px-8'>
- <Text
- as='h1'
- size='4xl'
- weight='bold'
- colour='primary'
- className='text-balance'
- >
- {t('checkout.title')}
- </Text>
- <Text
- as='p'
- size='lg'
- colour='secondary'
- className='mx-auto mt-4 max-w-xl text-pretty'
- >
- {t('checkout.subtitle', { days: TRIAL_DAYS })}
- </Text>
+ <div className='mx-auto max-w-5xl px-4 pt-8 sm:px-6 lg:px-8'>
+ <section className='rounded-2xl bg-white p-5 ring-1 ring-gray-200 sm:p-6 dark:bg-slate-900 dark:ring-white/10'>
+ <div className='flex items-start gap-4'>
+ <span className='grid size-10 shrink-0 place-items-center rounded-xl bg-emerald-50 text-emerald-600 dark:bg-emerald-400/10 dark:text-emerald-300'>
+ <CheckCircleIcon weight='fill' className='size-5' />
+ </span>
+ <div>
+ <Text as='p' size='xs' weight='semibold' colour='secondary'>
+ {t('checkout.ready.eyebrow')}
+ </Text>
+ <Text
+ as='h1'
+ size='3xl'
+ weight='bold'
+ colour='primary'
+ tracking='tight'
+ className='mt-1 text-balance sm:text-4xl'
+ >
+ {t('checkout.ready.title')}
+ </Text>
+ <Text
+ as='p'
+ size='base'
+ colour='secondary'
+ className='mt-2 max-w-2xl leading-relaxed text-pretty'
+ >
+ {t('checkout.ready.subtitle', { days: TRIAL_DAYS })}
+ </Text>
+ </div>
+ </div>
+ </section>
</div>
{hasCompletedCheckout ? (
@@ -300,23 +324,80 @@ const Subscribe = () => {
</div>
) : null}
- <div className='mt-2'>
+ <div
+ id='start-trial'
+ tabIndex={-1}
+ className='scroll-mt-6 outline-none focus-visible:ring-2 focus-visible:ring-slate-900 dark:focus-visible:ring-slate-300'
+ >
<PricingInternal
metainfo={metainfo}
onSelectPlan={handlePlanSelection}
+ onSelectionChange={setPricingContext}
loadingPlanType={selectionLoading?.planType ?? null}
disabled={Boolean(selectionLoading) || hasCompletedCheckout}
showVatNote
/>
</div>
+ <SubscribeRating websiteCount={stats?.projects} />
+
<TrialTimeline />
- <div className='mx-auto w-full max-w-4xl px-4 pt-10 sm:px-6 lg:px-8'>
- <Text as='h2' size='2xl' weight='bold'>
- {t('main.faq.title')}
- </Text>
- <FAQ items={faqItems} className='mt-3' defaultOpenFirst />
+ <div className='mx-auto w-full max-w-5xl space-y-16 px-4 pt-16 sm:px-6 sm:pt-20 lg:px-8'>
+ <SubscribeFeatures />
+
+ <SubscribeIncluded
+ monthlyEvents={
+ pricingContext?.monthlyEvents ?? EVENT_TIERS['100k'].monthlyEvents
+ }
+ isCustomEventTier={pricingContext?.isCustomEventTier ?? false}
+ />
+
+ <SubscribeProof />
+
+ <section className='mx-auto max-w-4xl'>
+ <Text as='h2' size='2xl' weight='bold' tracking='tight'>
+ {t('checkout.faq.title')}
+ </Text>
+ <Text
+ as='p'
+ size='base'
+ colour='secondary'
+ className='mt-2 leading-relaxed text-pretty'
+ >
+ {t('checkout.faq.subtitle')}
+ </Text>
+ <FAQ items={faqItems} className='mt-5' defaultOpenFirst />
+ </section>
+
+ <section className='rounded-2xl bg-white px-5 py-8 text-center ring-1 ring-gray-200 sm:px-8 sm:py-10 dark:bg-slate-900 dark:ring-white/10'>
+ <Text
+ as='h2'
+ size='2xl'
+ weight='bold'
+ tracking='tight'
+ className='text-balance'
+ >
+ {t('checkout.finalCta.title')}
+ </Text>
+ <Text
+ as='p'
+ size='sm'
+ colour='secondary'
+ className='mx-auto mt-2 max-w-xl leading-relaxed text-pretty'
+ >
+ {t('checkout.finalCta.subtitle', { days: TRIAL_DAYS })}
+ </Text>
+ <Button
+ type='button'
+ size='lg'
+ onClick={scrollToPricing}
+ className='mt-6 justify-center gap-2'
+ >
+ {t('checkout.finalCta.button')}
+ <ArrowUpIcon weight='bold' className='size-4' />
+ </Button>
+ </section>
</div>
</main>
diff --git a/web/app/pages/Subscribe/SubscribeFeatures.tsx b/web/app/pages/Subscribe/SubscribeFeatures.tsx
new file mode 100644
index 000000000..a357a449c
--- /dev/null
+++ b/web/app/pages/Subscribe/SubscribeFeatures.tsx
@@ -0,0 +1,159 @@
+import {
+ BugIcon,
+ CursorClickIcon,
+ GaugeIcon,
+ MonitorPlayIcon,
+ PlayIcon,
+ type Icon,
+} from '@phosphor-icons/react'
+import { useTranslation } from 'react-i18next'
+
+import { useTheme } from '~/providers/ThemeProvider'
+import { Text } from '~/ui/Text'
+
+interface FeatureCard {
+ key: 'traffic' | 'performance' | 'errors' | 'sessions'
+ icon: Icon
+ imageLight?: string
+ imageDark?: string
+}
+
+const FEATURES: FeatureCard[] = [
+ {
+ key: 'traffic',
+ icon: CursorClickIcon,
+ imageLight: '/assets/screenshot_light.png',
+ imageDark: '/assets/screenshot_dark.png',
+ },
+ {
+ key: 'performance',
+ icon: GaugeIcon,
+ imageLight: '/assets/screenshot_perf_light.png',
+ imageDark: '/assets/screenshot_perf_dark.png',
+ },
+ {
+ key: 'errors',
+ icon: BugIcon,
+ imageLight: '/assets/screenshot_errors_light.png',
+ imageDark: '/assets/screenshot_errors_dark.png',
+ },
+ {
+ key: 'sessions',
+ icon: MonitorPlayIcon,
+ },
+]
+
+const SessionPreview = () => (
+ <div
+ aria-hidden='true'
+ className='flex h-full items-center justify-center bg-slate-100 px-6 dark:bg-slate-950'
+ >
+ <div className='w-full max-w-sm overflow-hidden rounded-xl bg-white shadow-[0_16px_40px_rgba(15,23,42,0.12)] ring-1 ring-gray-200 dark:bg-slate-900 dark:shadow-[0_16px_40px_rgba(0,0,0,0.35)] dark:ring-white/10'>
+ <div className='flex items-center justify-between border-b border-gray-100 px-3 py-2 dark:border-white/10'>
+ <div className='flex items-center gap-1.5'>
+ <span className='size-1.5 rounded-full bg-red-400' />
+ <span className='size-1.5 rounded-full bg-amber-400' />
+ <span className='size-1.5 rounded-full bg-emerald-400' />
+ </div>
+ <span className='text-[9px] font-medium text-gray-400 dark:text-slate-500'>
+ 00:42 / 02:18
+ </span>
+ </div>
+ <div className='relative aspect-[16/7] bg-gray-50 dark:bg-slate-950/70'>
+ <div className='absolute top-3 left-3 h-2 w-20 rounded-sm bg-gray-200 dark:bg-slate-700' />
+ <div className='absolute top-7 left-3 h-1.5 w-28 rounded-sm bg-gray-200/80 dark:bg-slate-800' />
+ <div className='absolute right-4 bottom-4 left-3 grid grid-cols-3 gap-2'>
+ <span className='h-8 rounded-md bg-indigo-100 ring-1 ring-indigo-200 dark:bg-indigo-500/10 dark:ring-indigo-400/20' />
+ <span className='h-8 rounded-md bg-white ring-1 ring-gray-200 dark:bg-slate-900 dark:ring-white/10' />
+ <span className='h-8 rounded-md bg-white ring-1 ring-gray-200 dark:bg-slate-900 dark:ring-white/10' />
+ </div>
+ <CursorClickIcon
+ weight='fill'
+ className='absolute top-9 left-[42%] size-5 rotate-[-12deg] text-indigo-600 drop-shadow-sm dark:text-indigo-300'
+ />
+ </div>
+ <div className='flex items-center gap-2 px-3 py-2.5'>
+ <span className='grid size-6 shrink-0 place-items-center rounded-full bg-slate-900 text-white dark:bg-white dark:text-slate-900'>
+ <PlayIcon weight='fill' className='size-2.5 translate-x-px' />
+ </span>
+ <div className='h-1.5 flex-1 overflow-hidden rounded-full bg-gray-200 dark:bg-slate-700'>
+ <div className='h-full w-[38%] rounded-full bg-indigo-500' />
+ </div>
+ <span className='size-1.5 rounded-full bg-pink-400' />
+ <span className='size-1.5 rounded-full bg-amber-400' />
+ <span className='size-1.5 rounded-full bg-cyan-400' />
+ </div>
+ </div>
+ </div>
+)
+
+export const SubscribeFeatures = () => {
+ const { t } = useTranslation('common')
+ const { theme } = useTheme()
+
+ return (
+ <section>
+ <div className='max-w-2xl'>
+ <Text as='h2' size='2xl' weight='bold' tracking='tight'>
+ {t('checkout.features.title')}
+ </Text>
+ <Text
+ as='p'
+ size='base'
+ colour='secondary'
+ className='mt-2 max-w-2xl leading-relaxed text-pretty'
+ >
+ {t('checkout.features.subtitle')}
+ </Text>
+ </div>
+
+ <div className='mt-6 grid gap-4 sm:grid-cols-2'>
+ {FEATURES.map((feature) => {
+ const FeatureIcon = feature.icon
+ const imageSrc =
+ theme === 'dark' ? feature.imageDark : feature.imageLight
+
+ return (
+ <article
+ key={feature.key}
+ className='group overflow-hidden rounded-2xl bg-white ring-1 ring-gray-200 transition-[transform,box-shadow] duration-300 ease-out hover:-translate-y-0.5 hover:shadow-[0_18px_45px_rgba(15,23,42,0.08)] motion-reduce:transform-none dark:bg-slate-900 dark:ring-white/10 dark:hover:shadow-[0_18px_45px_rgba(0,0,0,0.25)]'
+ >
+ <div className='aspect-[16/9] overflow-hidden border-b border-gray-100 bg-gray-100 dark:border-white/10 dark:bg-slate-950'>
+ {imageSrc ? (
+ <img
+ src={imageSrc}
+ alt={t(`checkout.features.cards.${feature.key}.alt`)}
+ width={1167}
+ height={835}
+ loading='lazy'
+ className='h-full w-full object-cover object-top transition-transform duration-500 ease-out group-hover:scale-[1.015] motion-reduce:transform-none'
+ />
+ ) : (
+ <SessionPreview />
+ )}
+ </div>
+ <div className='p-5 sm:p-6'>
+ <div className='flex items-center gap-2.5'>
+ <span className='grid size-8 shrink-0 place-items-center rounded-lg bg-indigo-50 text-indigo-600 dark:bg-indigo-400/10 dark:text-indigo-300'>
+ <FeatureIcon weight='duotone' className='size-4.5' />
+ </span>
+ <Text as='h3' size='lg' weight='semibold' tracking='tight'>
+ {t(`checkout.features.cards.${feature.key}.title`)}
+ </Text>
+ </div>
+ <Text
+ as='p'
+ size='sm'
+ colour='secondary'
+ className='mt-3 leading-relaxed text-pretty'
+ >
+ {t(`checkout.features.cards.${feature.key}.description`)}
+ </Text>
+ </div>
+ </article>
+ )
+ })}
+ </div>
+ </section>
+ )
+}
diff --git a/web/app/pages/Subscribe/SubscribeIncluded.tsx b/web/app/pages/Subscribe/SubscribeIncluded.tsx
new file mode 100644
index 000000000..719f7c978
--- /dev/null
+++ b/web/app/pages/Subscribe/SubscribeIncluded.tsx
@@ -0,0 +1,168 @@
+import {
+ BracketsAngleIcon,
+ CheckCircleIcon,
+ DownloadSimpleIcon,
+ EnvelopeSimpleIcon,
+ GlobeIcon,
+ MonitorPlayIcon,
+ ShieldCheckIcon,
+ UsersThreeIcon,
+ type Icon,
+} from '@phosphor-icons/react'
+import { useTranslation } from 'react-i18next'
+
+import { Text } from '~/ui/Text'
+import { cn } from '~/utils/generic'
+
+interface SubscribeIncludedProps {
+ monthlyEvents: number
+ isCustomEventTier: boolean
+}
+
+interface IncludedCard {
+ figure: string
+ label: string
+ body: string
+ icon: Icon
+ tint: string
+ placement: string
+}
+
+const MORE_INCLUDED: Array<{ key: string; icon: Icon }> = [
+ { key: 'privacy', icon: ShieldCheckIcon },
+ { key: 'imports', icon: DownloadSimpleIcon },
+ { key: 'reports', icon: EnvelopeSimpleIcon },
+ { key: 'api', icon: BracketsAngleIcon },
+ { key: 'sharing', icon: GlobeIcon },
+ { key: 'ownership', icon: CheckCircleIcon },
+]
+
+export const SubscribeIncluded = ({
+ monthlyEvents,
+ isCustomEventTier,
+}: SubscribeIncludedProps) => {
+ const {
+ t,
+ i18n: { language },
+ } = useTranslation('common')
+ const formatNumber = (value: number) => value.toLocaleString(language)
+ const replayQuota = Math.round(monthlyEvents * 0.05)
+
+ const core: IncludedCard[] = [
+ {
+ figure: `${formatNumber(monthlyEvents)}${isCustomEventTier ? '+' : ''}`,
+ label: t('checkout.included.cards.events.title'),
+ body: t('checkout.included.cards.events.description'),
+ icon: CheckCircleIcon,
+ tint: 'text-indigo-500/[0.11] dark:text-indigo-300/[0.08]',
+ placement: '-right-5 -bottom-9 -rotate-6',
+ },
+ {
+ figure: '10 / 100',
+ label: t('checkout.included.cards.websites.title'),
+ body: t('checkout.included.cards.websites.description'),
+ icon: GlobeIcon,
+ tint: 'text-cyan-500/[0.12] dark:text-cyan-300/[0.08]',
+ placement: '-left-6 -bottom-9 rotate-6',
+ },
+ {
+ figure: '10 / 25',
+ label: t('checkout.included.cards.members.title'),
+ body: t('checkout.included.cards.members.description'),
+ icon: UsersThreeIcon,
+ tint: 'text-amber-500/[0.12] dark:text-amber-300/[0.08]',
+ placement: '-right-4 -bottom-8 rotate-6',
+ },
+ {
+ figure: `${formatNumber(replayQuota)}${isCustomEventTier ? '+' : ''}`,
+ label: t('checkout.included.cards.replays.title'),
+ body: t('checkout.included.cards.replays.description'),
+ icon: MonitorPlayIcon,
+ tint: 'text-pink-500/[0.1] dark:text-pink-300/[0.08]',
+ placement: '-left-5 -bottom-9 -rotate-6',
+ },
+ ]
+
+ return (
+ <section>
+ <div className='max-w-2xl'>
+ <Text as='h2' size='2xl' weight='bold' tracking='tight'>
+ {t('checkout.included.title')}
+ </Text>
+ <Text
+ as='p'
+ size='base'
+ colour='secondary'
+ className='mt-2 max-w-2xl leading-relaxed text-pretty'
+ >
+ {t('checkout.included.subtitle')}
+ </Text>
+ </div>
+
+ <div className='mt-6 grid gap-3 sm:grid-cols-2'>
+ {core.map((item) => (
+ <article
+ key={item.label}
+ className='relative min-h-44 overflow-hidden rounded-2xl bg-white p-5 ring-1 ring-gray-200 dark:bg-slate-900 dark:ring-white/10'
+ >
+ <item.icon
+ weight='thin'
+ aria-hidden='true'
+ className={cn(
+ 'pointer-events-none absolute size-32',
+ item.tint,
+ item.placement,
+ )}
+ />
+ <div className='relative z-10'>
+ <Text
+ as='p'
+ size='2xl'
+ weight='bold'
+ tracking='tight'
+ className='tabular-nums'
+ >
+ {item.figure}
+ </Text>
+ <Text as='h3' size='sm' weight='semibold' className='mt-1'>
+ {item.label}
+ </Text>
+ <Text
+ as='p'
+ size='sm'
+ colour='secondary'
+ className='mt-3 max-w-[21rem] leading-relaxed text-pretty'
+ >
+ {item.body}
+ </Text>
+ </div>
+ </article>
+ ))}
+ </div>
+
+ <Text
+ as='p'
+ size='xs'
+ weight='semibold'
+ colour='secondary'
+ className='mt-6'
+ >
+ {t('checkout.included.moreTitle')}
+ </Text>
+ <ul className='mt-3 grid gap-2 sm:grid-cols-2'>
+ {MORE_INCLUDED.map((item) => (
+ <li
+ key={item.key}
+ className='flex items-center gap-2.5 rounded-xl bg-white px-3.5 py-3 text-sm text-slate-900 ring-1 ring-gray-200 dark:bg-slate-900 dark:text-white dark:ring-white/10'
+ >
+ <item.icon
+ weight='regular'
+ className='size-4 shrink-0 text-slate-500 dark:text-slate-400'
+ />
+ {t(`checkout.included.more.${item.key}`)}
+ </li>
+ ))}
+ </ul>
+ </section>
+ )
+}
diff --git a/web/app/pages/Subscribe/SubscribeProof.tsx b/web/app/pages/Subscribe/SubscribeProof.tsx
new file mode 100644
index 000000000..1211d3ad8
--- /dev/null
+++ b/web/app/pages/Subscribe/SubscribeProof.tsx
@@ -0,0 +1,102 @@
+import { QuotesIcon } from '@phosphor-icons/react'
+import { useTranslation } from 'react-i18next'
+
+import { useTheme } from '~/providers/ThemeProvider'
+import { Text } from '~/ui/Text'
+
+const TESTIMONIALS = [
+ {
+ key: 'alex',
+ avatar: '/assets/users/alex-casterlabs.jpg',
+ logoLight: '/assets/users/casterlabs-light.svg',
+ logoDark: '/assets/users/casterlabs-dark.svg',
+ logoWidth: 157,
+ logoHeight: 48,
+ },
+ {
+ key: 'alper',
+ avatar: '/assets/users/alper-phalcode.jpg',
+ logoLight: '/assets/users/phalcode-light.svg',
+ logoDark: '/assets/users/phalcode-dark.svg',
+ logoWidth: 200,
+ logoHeight: 32,
+ },
+] as const
+
+export const SubscribeProof = () => {
+ const { t } = useTranslation('common')
+ const { theme } = useTheme()
+
+ return (
+ <section>
+ <div className='max-w-2xl'>
+ <Text as='h2' size='2xl' weight='bold' tracking='tight'>
+ {t('checkout.testimonials.title')}
+ </Text>
+ <Text
+ as='p'
+ size='base'
+ colour='secondary'
+ className='mt-2 leading-relaxed text-pretty'
+ >
+ {t('checkout.testimonials.subtitle')}
+ </Text>
+ </div>
+
+ <div className='mt-6 grid gap-4 lg:grid-cols-2'>
+ {TESTIMONIALS.map((testimonial) => (
+ <figure
+ key={testimonial.key}
+ className='relative flex min-h-80 flex-col overflow-hidden rounded-2xl bg-white p-6 ring-1 ring-gray-200 sm:p-7 dark:bg-slate-900 dark:ring-white/10'
+ >
+ <QuotesIcon
+ aria-hidden='true'
+ weight='fill'
+ className='pointer-events-none absolute -top-5 -right-3 size-28 rotate-6 text-indigo-500/[0.07] dark:text-indigo-300/[0.06]'
+ />
+ <img
+ src={
+ theme === 'dark' ? testimonial.logoDark : testimonial.logoLight
+ }
+ alt={t(`checkout.testimonials.items.${testimonial.key}.company`)}
+ width={testimonial.logoWidth}
+ height={testimonial.logoHeight}
+ loading='lazy'
+ className='relative h-8 w-auto self-start object-contain object-left'
+ />
+ <blockquote className='relative mt-8 flex-1'>
+ <Text
+ as='p'
+ size='lg'
+ colour='primary'
+ className='leading-relaxed text-pretty'
+ >
+ &ldquo;
+ {t(`checkout.testimonials.items.${testimonial.key}.quote`)}
+ &rdquo;
+ </Text>
+ </blockquote>
+ <figcaption className='relative mt-8 flex items-center gap-3'>
+ <img
+ src={testimonial.avatar}
+ alt=''
+ width={44}
+ height={44}
+ loading='lazy'
+ className='size-11 rounded-xl object-cover ring-1 ring-gray-200 dark:ring-white/10'
+ />
+ <div>
+ <Text as='p' size='sm' weight='semibold'>
+ {t(`checkout.testimonials.items.${testimonial.key}.name`)}
+ </Text>
+ <Text as='p' size='xs' colour='secondary' className='mt-0.5'>
+ {t(`checkout.testimonials.items.${testimonial.key}.role`)}
+ </Text>
+ </div>
+ </figcaption>
+ </figure>
+ ))}
+ </div>
+ </section>
+ )
+}
diff --git a/web/app/pages/Subscribe/SubscribeRating.tsx b/web/app/pages/Subscribe/SubscribeRating.tsx
new file mode 100644
index 000000000..cd2617357
--- /dev/null
+++ b/web/app/pages/Subscribe/SubscribeRating.tsx
@@ -0,0 +1,89 @@
+import { StarIcon } from '@phosphor-icons/react'
+import { useTranslation } from 'react-i18next'
+
+import { Text } from '~/ui/Text'
+
+const REVIEWERS = [
+ { name: 'Luke', image: '/assets/small-testimonials/luke.jpg' },
+ { name: 'Alex', image: '/assets/small-testimonials/alex.jpg' },
+ { name: 'Artur', image: '/assets/small-testimonials/artur.jpg' },
+ { name: 'Alper', image: '/assets/small-testimonials/alper.jpg' },
+ { name: 'Andrii', image: '/assets/small-testimonials/andrii.jpg' },
+]
+
+const RatingStars = () => (
+ <div className='flex items-center gap-0.5 text-amber-500' aria-hidden='true'>
+ {Array.from({ length: 4 }).map((_, index) => (
+ <StarIcon key={index} weight='fill' className='size-4' />
+ ))}
+ <span className='relative block size-4'>
+ <StarIcon weight='regular' className='absolute inset-0 size-4' />
+ <span className='absolute inset-y-0 left-0 w-[30%] overflow-hidden'>
+ <StarIcon weight='fill' className='size-4 max-w-none' />
+ </span>
+ </span>
+ </div>
+)
+
+export const SubscribeRating = ({
+ websiteCount,
+}: {
+ websiteCount?: number | null
+}) => {
+ const {
+ t,
+ i18n: { language },
+ } = useTranslation('common')
+
+ return (
+ <section className='mx-auto w-full max-w-5xl px-4 pt-8 sm:px-6 lg:px-8'>
+ <div className='flex flex-col items-center justify-center gap-5 rounded-2xl bg-white px-5 py-4 ring-1 ring-gray-200 sm:flex-row sm:gap-7 dark:bg-slate-900 dark:ring-white/10'>
+ <div
+ className='flex flex-wrap items-center justify-center gap-x-2.5 gap-y-1'
+ aria-label={t('checkout.rating.ariaLabel')}
+ >
+ <RatingStars />
+ <a
+ href='https://www.g2.com/products/swetrix/reviews'
+ target='_blank'
+ rel='noreferrer noopener'
+ className='rounded-sm text-sm font-semibold text-slate-900 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-slate-900 focus-visible:outline-hidden dark:text-white dark:focus-visible:ring-slate-300'
+ >
+ {t('checkout.rating.score')}
+ </a>
+ <Text as='span' size='xs' colour='secondary'>
+ {t('checkout.rating.reviews')}
+ </Text>
+ </div>
+
+ <span
+ aria-hidden='true'
+ className='hidden h-8 w-px bg-gray-200 sm:block dark:bg-white/10'
+ />
+
+ <div className='flex items-center gap-3'>
+ <div className='flex -space-x-2.5' aria-hidden='true'>
+ {REVIEWERS.map((reviewer) => (
+ <img
+ key={reviewer.name}
+ src={reviewer.image}
+ alt=''
+ width={32}
+ height={32}
+ loading='lazy'
+ className='size-8 rounded-lg object-cover ring-2 ring-white dark:ring-slate-900'
+ />
+ ))}
+ </div>
+ <Text as='p' size='sm' colour='secondary'>
+ {websiteCount != null
+ ? t('checkout.rating.websites', {
+ count: websiteCount.toLocaleString(language),
+ })
+ : t('checkout.rating.websitesFallback')}
+ </Text>
+ </div>
+ </div>
+ </section>
+ )
+}
diff --git a/web/app/routes/subscribe.tsx b/web/app/routes/subscribe.tsx
index 61ab9b3f6..236d9a54a 100644
--- a/web/app/routes/subscribe.tsx
+++ b/web/app/routes/subscribe.tsx
@@ -3,9 +3,14 @@ import type { LoaderFunctionArgs, MetaFunction } from 'react-router'
import { data, redirect } from 'react-router'
import type { SitemapFunction } from 'remix-sitemap'
-import { getAuthenticatedUser, serverFetch } from '~/api/api.server'
+import {
+ getAuthenticatedUser,
+ getGeneralStats,
+ serverFetch,
+} from '~/api/api.server'
import { getOgImageUrl, isSelfhosted } from '~/lib/constants'
import { DEFAULT_METAINFO, Metainfo } from '~/lib/models/Metainfo'
+import type { Stats } from '~/lib/models/Stats'
import Subscribe from '~/pages/Subscribe'
import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'
import {
@@ -32,6 +37,7 @@ export const meta: MetaFunction = () => {
export interface SubscribeLoaderData {
metainfo: Metainfo
+ stats: Stats | null
}
export async function loader({ request }: LoaderFunctionArgs) {
@@ -67,13 +73,16 @@ export async function loader({ request }: LoaderFunctionArgs) {
return redirect('/dashboard')
}
- const metainfoResult = await serverFetch<Metainfo>(request, 'user/metainfo', {
- skipAuth: true,
- })
+ const [metainfoResult, stats] = await Promise.all([
+ serverFetch<Metainfo>(request, 'user/metainfo', {
+ skipAuth: true,
+ }),
+ getGeneralStats(request),
+ ])
const metainfo = metainfoResult.data ?? DEFAULT_METAINFO
const allCookies = [...cookies, ...metainfoResult.cookies]
- const loaderData: SubscribeLoaderData = { metainfo }
+ const loaderData: SubscribeLoaderData = { metainfo, stats }
if (allCookies.length > 0) {
return data(loaderData, {
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 466b66b5a..862da9f38 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -3152,6 +3152,7 @@
},
"features": {
"websites": "Websites",
+ "teamMembers": "Team members",
"realtimeDashboard": "Real-time dashboard",
"cookieless": "Cookieless tracking",
"noDataSampling": "No data sampling",
@@ -3172,6 +3173,8 @@
"unlimited": "Unlimited",
"websitesStandard": "10",
"websitesPlus": "100",
+ "teamMembersStandard": "10",
+ "teamMembersPlus": "25",
"eventsUpTo": "Up to 50M",
"apiRateStandard": "300 / hour",
"apiRatePlus": "6,000 / hour"
@@ -3359,6 +3362,18 @@
"title": "Start your free trial",
"subtitle": "Try Swetrix free for {{days}} days. Cancel anytime.",
"successRedirect": "Your checkout is complete. We're updating your subscription and will take you to your dashboard shortly.",
+ "ready": {
+ "eyebrow": "Setup complete",
+ "title": "Your analytics workspace is ready",
+ "subtitle": "Your first project is set up. Choose a plan and use Swetrix with your real traffic free for {{days}} days."
+ },
+ "rating": {
+ "ariaLabel": "Swetrix is rated 4.3 out of 5 on G2",
+ "score": "4.3/5 on G2",
+ "reviews": "14 reviews",
+ "websites": "{{count}} websites added to Swetrix",
+ "websitesFallback": "Thousands of websites added to Swetrix"
+ },
"trial": {
"today": "Today",
"step1Label": "Your free trial starts with full access",
@@ -3366,6 +3381,120 @@
"step3Label": "Your first payment is taken unless you cancel",
"footer": "Cancel anytime before the trial ends. We won't charge you before then."
},
+ "features": {
+ "title": "One script. Four ways to understand your website",
+ "subtitle": "Swetrix connects traffic, product behaviour and technical health in one focused workspace, without following people across the web.",
+ "cards": {
+ "traffic": {
+ "title": "Traffic analytics",
+ "description": "See visitors, acquisition channels, campaigns, popular pages, goals and live activity without digging through layers of reports.",
+ "alt": "Swetrix traffic dashboard with visitor, session and pageview trends"
+ },
+ "performance": {
+ "title": "Performance monitoring",
+ "description": "Measure real-user frontend, backend and network timing, then find the pages, browsers and regions that need attention.",
+ "alt": "Swetrix performance dashboard with frontend, backend and network timing"
+ },
+ "errors": {
+ "title": "Error tracking",
+ "description": "Capture browser exceptions with stack traces, affected users and session context, next to the analytics you already check.",
+ "alt": "Swetrix error dashboard with error trends and recent exceptions"
+ },
+ "sessions": {
+ "title": "Sessions and replays",
+ "description": "Follow individual journeys to understand drop-offs and behaviour. Plus plans can replay recorded sessions when recording is enabled.",
+ "alt": "Swetrix session replay timeline"
+ }
+ }
+ },
+ "included": {
+ "title": "What's included",
+ "subtitle": "The event allowance below follows the volume selected above. Standard includes the complete analytics toolkit; Plus raises workspace limits and adds replays and experiments.",
+ "cards": {
+ "events": {
+ "title": "events per month",
+ "description": "Pageviews, custom events, CAPTCHA completions and error events all count toward this shared allowance."
+ },
+ "websites": {
+ "title": "websites on Standard / Plus",
+ "description": "Keep 10 websites on Standard or 100 on Plus, with add-ons available if your portfolio grows."
+ },
+ "members": {
+ "title": "team members on Standard / Plus",
+ "description": "Invite collaborators, assign access and keep everyone in the same workspace without per-seat pricing."
+ },
+ "replays": {
+ "title": "session replays per month on Plus",
+ "description": "The replay allowance scales with your selected event volume. Recording starts only when you enable it."
+ }
+ },
+ "moreTitle": "Also included",
+ "more": {
+ "privacy": "Cookieless analytics and advanced bot filtering",
+ "imports": "Imports from Google Analytics and other platforms",
+ "reports": "Email reports, alerts and notification channels",
+ "api": "REST API, Events API and SDKs",
+ "sharing": "Public and password-protected dashboards",
+ "ownership": "Open-source code and a self-hosted Community Edition"
+ }
+ },
+ "testimonials": {
+ "title": "Don't take our word for it",
+ "subtitle": "Teams use Swetrix to get useful answers without handing their visitors over to an advertising platform.",
+ "items": {
+ "alex": {
+ "company": "Casterlabs",
+ "quote": "Swetrix has been a game changer for our analytics. They've always been on top of feature requests and bug reports and have been friendly every step of the way. I can't recommend them enough.",
+ "name": "Alex Bowles",
+ "role": "Co-founder of Casterlabs"
+ },
+ "alper": {
+ "company": "Phalcode",
+ "quote": "I was confused by Google Analytics so much that I was getting zero actionable insights. Swetrix changed everything — clean dashboard, instant understanding of user behavior, and features that actually matter. Finally, analytics that help me make better decisions instead of irritating me.",
+ "name": "Alper Alkan",
+ "role": "Co-founder of Phalcode"
+ }
+ }
+ },
+ "faq": {
+ "title": "Questions before you start",
+ "subtitle": "The practical details that matter when you put real traffic through Swetrix.",
+ "items": [
+ {
+ "q": "What happens during my {{days}}-day trial?",
+ "a": "Your trial starts as soon as checkout finishes. You can connect your real website and use the Swetrix dashboard immediately. We'll email you two days before the first payment; cancel before the trial ends and you won't be charged."
+ },
+ {
+ "q": "What counts toward my monthly event limit?",
+ "a": "Pageviews, custom events, CAPTCHA completions and error events count toward the shared monthly allowance. Session replays have a separate quota on Plus plans."
+ },
+ {
+ "q": "Should I choose Standard or Plus?",
+ "a": "Choose Standard for the core analytics suite, including traffic, funnels, performance monitoring, error tracking, reports and API access. Choose Plus if you also need session replays, feature flags, A/B testing, higher workspace limits or priority support."
+ },
+ {
+ "q": "What happens if I exceed my event limit?",
+ "a": "Swetrix keeps collecting your data. We'll notify you as you approach the limit, and you can move to a higher event tier to keep full access to your statistics. Occasional small traffic spikes do not immediately lock your dashboard."
+ },
+ {
+ "q": "Can I change my plan or cancel?",
+ "a": "Yes. You can change or cancel your plan from account settings. Paid plan changes are prorated, and cancelling before the trial ends prevents the first charge."
+ },
+ {
+ "q": "Can I bring my existing analytics data?",
+ "a": "Yes. Swetrix can import historical data from Google Analytics, Plausible, Fathom, Umami, Simple Analytics and other supported platforms."
+ },
+ {
+ "q": "Will I need a cookie banner?",
+ "a": "Swetrix is cookieless by default and does not use persistent cross-site identifiers. Many websites can therefore use it without analytics consent banners, but your exact obligations still depend on your configuration and local rules."
+ }
+ ]
+ },
+ "finalCta": {
+ "title": "Ready to understand what your visitors are doing?",
+ "subtitle": "Choose a plan and use Swetrix with your real traffic for {{days}} days. You won't be charged today, and you can cancel before the trial ends.",
+ "button": "Choose your plan"
+ },
"faqTrial": {
"q": "What happens when my trial ends?",
"a": "We'll email you 2 days before your {{days}}-day trial ends. If you cancel before the trial ends, you won't be charged."