📈 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
Feature comparison table for the billing page
Blue Mouseacd3417ab421
diff --git a/web/app/components/pricing/BillingPricing.tsx b/web/app/components/pricing/BillingPricing.tsxindex bd74216db..47a549568 100644--- a/web/app/components/pricing/BillingPricing.tsx+++ b/web/app/components/pricing/BillingPricing.tsx@@ -1,6 +1,6 @@import dayjs from 'dayjs'import _isNil from 'lodash/isNil'-import { ArrowLeftIcon } from '@phosphor-icons/react'+import { ArrowLeftIcon, CaretDownIcon } from '@phosphor-icons/react'import type { TFunction } from 'i18next'import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'import { Trans, useTranslation } from 'react-i18next'@@ -11,6 +11,7 @@ import {PricingInternal,type MarketingPricingSelection,} from '~/components/pricing/MarketingPricing'+import { PricingComparisonTable } from '~/components/pricing/PricingComparisonTable'import {CONTACT_EMAIL,paddleLanguageMapping,@@ -493,6 +494,23 @@ const BillingPricing = ({/></div>+ <div className='mx-auto w-full max-w-7xl px-4 pt-10 sm:px-6 lg:px-8'>+ <details className='group/compare'>+ <summary className='mx-auto flex w-fit cursor-pointer list-none items-center gap-2 rounded-lg px-4 py-2 transition-colors hover:bg-gray-100 focus-visible:ring-2 focus-visible:ring-slate-900 focus-visible:outline-hidden dark:hover:bg-slate-800 dark:focus-visible:ring-slate-300'>+ <Text as='span' size='sm' weight='medium' colour='primary'>+ {t('billing.compareAllFeatures')}+ </Text>+ <CaretDownIcon+ className='size-4 shrink-0 text-slate-500 transition-transform duration-200 ease-out group-open/compare:rotate-180 dark:text-slate-400'+ aria-hidden='true'+ />+ </summary>+ <div className='mt-6'>+ <PricingComparisonTable metainfo={metainfo} variant='billing' />+ </div>+ </details>+ </div>+<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('billing.planFaqTitle')}diff --git a/web/app/components/pricing/PricingComparisonTable.tsx b/web/app/components/pricing/PricingComparisonTable.tsxindex f8afdd23e..861332e7d 100644--- a/web/app/components/pricing/PricingComparisonTable.tsx+++ b/web/app/components/pricing/PricingComparisonTable.tsx@@ -336,10 +336,12 @@ const RowTooltipContent = ({interface PricingComparisonTableProps {metainfo?: Metainfo+ variant?: 'marketing' | 'billing'}export const PricingComparisonTable = ({metainfo = DEFAULT_METAINFO,+ variant = 'marketing',}: PricingComparisonTableProps) => {const {t,@@ -347,31 +349,33 @@ export const PricingComparisonTable = ({} = useTranslation('common')const categories = useMemo(() => getCategories(t), [t])+ const isMarketing = variant === 'marketing'+const currencyCode = (metainfo.code in CURRENCIES ? metainfo.code : 'USD') as CurrencyCode- return (- <section className='relative mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 lg:py-24'>- <div className='overflow-x-auto lg:overflow-x-visible'>- <table className='w-full min-w-[760px] border-separate border-spacing-0'>- <colgroup>- <col className='w-[34%]' />- <col className='w-[22%]' />- <col className='w-[22%]' />- <col className='w-[22%]' />- </colgroup>+ const table = (+ <div className='overflow-x-auto lg:overflow-x-visible'>+ <table className='w-full min-w-[760px] border-separate border-spacing-0'>+ <colgroup>+ <col className='w-[34%]' />+ <col className='w-[22%]' />+ <col className='w-[22%]' />+ <col className='w-[22%]' />+ </colgroup>- <thead className='sticky top-0 z-20'>- <tr>- <th- scope='col'- className={cn(- 'px-4 pt-6 pb-5 text-left align-bottom sm:px-6',- HEADER_BG,- 'border-b border-gray-200 dark:border-white/10',- )}- >+ <thead className='sticky top-0 z-20'>+ <tr>+ <th+ scope='col'+ className={cn(+ 'px-4 pt-6 pb-5 text-left align-bottom sm:px-6',+ HEADER_BG,+ 'border-b border-gray-200 dark:border-white/10',+ )}+ >+ {isMarketing ? (<Textas='h2'size='2xl'@@ -382,98 +386,103 @@ export const PricingComparisonTable = ({>{t('pricing.comparison.title')}</Text>- </th>- {PLAN_COLUMNS.map((plan) => {- const starterPrice = getPlanPrice(- plan.type,- STARTER_TIER,- 'monthly',- currencyCode,- )?.amount- const priceLabel =- starterPrice != null- ? t('pricing.comparison.fromPerMonth', {- price: formatCurrencyAmount(- starterPrice,- currencyCode,- language,- ),- })- : t('pricing.custom')+ ) : null}+ </th>+ {PLAN_COLUMNS.map((plan) => {+ const starterPrice = isMarketing+ ? getPlanPrice(plan.type, STARTER_TIER, 'monthly', currencyCode)+ ?.amount+ : null+ const priceLabel =+ starterPrice != null+ ? t('pricing.comparison.fromPerMonth', {+ price: formatCurrencyAmount(+ starterPrice,+ currencyCode,+ language,+ ),+ })+ : t('pricing.custom')- return (- // oxlint-disable-next-line jsx-a11y/control-has-associated-label- <th- key={plan.type}- scope='col'- className={cn(- 'px-4 pt-6 pb-5 text-center align-bottom sm:px-6',- 'border-b border-gray-200 dark:border-white/10',- plan.highlight- ? cn(PLUS_TINT, 'rounded-t-2xl')- : HEADER_BG,- )}- >- <div className='flex flex-col items-center gap-1.5'>- <div className='flex items-center gap-2'>- <Text- as='span'- size='lg'- weight='bold'- colour='primary'- >- {t(`pricing.planTypes.${plan.type}.name`)}- </Text>- {plan.highlight ? (- <Badge- label={t('pricing.bestValue')}- colour='slate'- size='sm'- />- ) : null}- </div>- <Text- as='span'- size='sm'- weight='medium'- colour='secondary'- >- {priceLabel}+ return (+ // oxlint-disable-next-line jsx-a11y/control-has-associated-label+ <th+ key={plan.type}+ scope='col'+ className={cn(+ 'px-4 pt-6 pb-5 text-center align-bottom sm:px-6',+ 'border-b border-gray-200 dark:border-white/10',+ plan.highlight ? cn(PLUS_TINT, 'rounded-t-2xl') : HEADER_BG,+ )}+ >+ <div className='flex flex-col items-center gap-1.5'>+ <div className='flex items-center gap-2'>+ <Text as='span' size='lg' weight='bold' colour='primary'>+ {t(`pricing.planTypes.${plan.type}.name`)}</Text>- <Button- to={plan.to}- variant={plan.highlight ? 'primary' : 'secondary'}- size='sm'- className='mt-1 justify-center gap-1.5'- >+ {plan.highlight ? (+ <Badge+ label={t('pricing.bestValue')}+ colour='slate'+ size='sm'+ />+ ) : null}+ </div>+ {isMarketing ? (+ <><Textas='span'- size='xs'- weight='semibold'- colour='inherit'+ size='sm'+ weight='medium'+ colour='secondary'>- {t(`pricing.planTypes.${plan.type}.cta`)}+ {priceLabel}</Text>- <ArrowRightIcon className='size-3.5' />- </Button>- </div>- </th>- )- })}- </tr>- </thead>+ <Button+ to={plan.to}+ variant={plan.highlight ? 'primary' : 'secondary'}+ size='sm'+ className='mt-1 justify-center gap-1.5'+ >+ <Text+ as='span'+ size='xs'+ weight='semibold'+ colour='inherit'+ >+ {t(`pricing.planTypes.${plan.type}.cta`)}+ </Text>+ <ArrowRightIcon className='size-3.5' />+ </Button>+ </>+ ) : null}+ </div>+ </th>+ )+ })}+ </tr>+ </thead>- <tbody>- {categories.map((category, categoryIndex) => (- <FeatureCategoryRows- key={category.title}- category={category}- isLastCategory={categoryIndex === categories.length - 1}- />- ))}- </tbody>- </table>- </div>+ <tbody>+ {categories.map((category, categoryIndex) => (+ <FeatureCategoryRows+ key={category.title}+ category={category}+ isLastCategory={categoryIndex === categories.length - 1}+ />+ ))}+ </tbody>+ </table>+ </div>+ )++ if (!isMarketing) {+ return table+ }++ return (+ <section className='relative mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 lg:py-24'>+ {table}</section>)}diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex 8e86f2424..496205e23 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -3091,6 +3091,7 @@"choosePlanTitle": "Choose a plan that fits your traffic","choosePlanPageDesc": "Pick your monthly event volume, plan type, and billing period. You'll see the exact price before checkout.","choosePlanCurrentPlanDesc": "Pick your monthly event volume, plan type, and billing period. Your current plan is {{plan}} with {{events}} events per month, and changes are prorated automatically.",+ "compareAllFeatures": "Compare all features","planFaqTitle": "Plan questions","currentUsageFaqQuestion": "What's my current usage?","currentUsageFaqAnswer": "You have used {{events}} billable events in the last 30 days. Please see your full usage report, including websites and team members, under the <subscriptionLink>Subscription section</subscriptionLink> in your account settings.",