📈 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
fix: align addon pricing and plan entitlements
Blue Mouse07d278e58e28
diff --git a/backend/migrations/mysql/2026_06_02_user_addon_charge_guards.sql b/backend/migrations/mysql/2026_06_02_user_addon_charge_guards.sqlindex 858fc550b..7a82c0b12 100644--- a/backend/migrations/mysql/2026_06_02_user_addon_charge_guards.sql+++ b/backend/migrations/mysql/2026_06_02_user_addon_charge_guards.sql@@ -3,22 +3,28 @@ ALTER TABLE `user_addon`ADD COLUMN `lastChargeId` varchar(36) DEFAULT NULL AFTER `cancelledAt`,ADD COLUMN `lastChargeAt` timestamp NULL DEFAULT NULL AFTER `lastChargeId`;-UPDATE `user_addon`-SET `recurringAmount` = ROUND(- (`quantity` / 50) *- CASE `currency`- WHEN 'EUR' THEN 7- WHEN 'GBP' THEN 6- ELSE 7.5+UPDATE `user_addon` addon+JOIN (+ SELECT 50 AS `quantity`, 0 AS `minQuantity`, 249 AS `maxQuantity`, 7.5 AS `USD`, 7 AS `EUR`, 6 AS `GBP`+ UNION ALL SELECT 250, 250, 999, 30, 27, 24+ UNION ALL SELECT 1000, 1000, 1000, 99, 89, 79+) bundle_price+ ON addon.`quantity` BETWEEN bundle_price.`minQuantity` AND bundle_price.`maxQuantity`+SET addon.`recurringAmount` = ROUND(+ (addon.`quantity` / bundle_price.`quantity`) *+ CASE addon.`currency`+ WHEN 'EUR' THEN bundle_price.`EUR`+ WHEN 'GBP' THEN bundle_price.`GBP`+ ELSE bundle_price.`USD`END *- CASE `billingInterval`+ CASE addon.`billingInterval`WHEN 'yearly' THEN 10ELSE 1END,2)-WHERE `quantity` > 0- AND `status` <> 'cancelled';+WHERE addon.`quantity` > 0+ AND addon.`status` <> 'cancelled';ALTER TABLE `user_addon_charge`ADD COLUMN `idempotencyKey` varchar(191) DEFAULT NULL AFTER `periodEnd`,diff --git a/web/app/components/pricing/MarketingPricing.tsx b/web/app/components/pricing/MarketingPricing.tsxindex e304535cb..036710d6a 100644--- a/web/app/components/pricing/MarketingPricing.tsx+++ b/web/app/components/pricing/MarketingPricing.tsx@@ -1,4 +1,5 @@import {+ ArrowLeftIcon,ArrowRightIcon,CaretDownIcon,CaretUpIcon,@@ -224,6 +225,31 @@ const BenefitTooltipContent = ({ tooltip }: { tooltip: BenefitTooltip }) => (</span>)+const PlanInheritanceRow = ({+ label,+ isEnterprise,+}: {+ label: string+ isEnterprise: boolean+}) => {+ return (+ <div className='flex items-start gap-2.5'>+ <ArrowLeftIcon+ className='mt-0.5 size-4 shrink-0 text-emerald-600'+ weight='bold'+ />+ <Text+ as='p'+ size='sm'+ colour='primary'+ className={cn('italic', isEnterprise ? 'dark' : '')}+ >+ {label}+ </Text>+ </div>+ )+}+const BenefitRow = ({benefit,isEnterprise,@@ -409,6 +435,17 @@ export const PricingInternal = ({<div className='mx-auto mt-6 grid max-w-7xl gap-4 px-4 sm:px-6 lg:grid-cols-3 lg:px-8'>{planCards.map((planType) => {const isEnterprise = planType === 'enterprise'+ const inheritancePlanType =+ planType === 'plus'+ ? 'standard'+ : planType === 'enterprise'+ ? 'plus'+ : null+ const inheritanceLabel = inheritancePlanType+ ? t('pricing.benefits.everythingFrom', {+ plan: getPlanName(inheritancePlanType, t),+ })+ : nullconst benefits = getBenefits(planType, t)const showAllBenefits = !!expandedBenefitsByPlan[planType]const visibleBenefits = showAllBenefits@@ -582,6 +619,12 @@ export const PricingInternal = ({</Button><div className='mt-5 space-y-3'>+ {inheritanceLabel ? (+ <PlanInheritanceRow+ label={inheritanceLabel}+ isEnterprise={isEnterprise}+ />+ ) : null}{visibleBenefits.map((benefit) => (<BenefitRowkey={benefit.label}diff --git a/web/app/lib/pricing/catalog.ts b/web/app/lib/pricing/catalog.tsindex 32a194fa2..1d2ff8b60 100644--- a/web/app/lib/pricing/catalog.ts+++ b/web/app/lib/pricing/catalog.ts@@ -112,6 +112,7 @@ export const EVENT_TIERS = {export const EVENT_TIER_CODES = Object.keys(EVENT_TIERS) as EventTierCode[]export const SELF_SERVE_PLAN_TYPES: PlanTypeCode[] = ['standard', 'plus']+const UNPAID_PLAN_CODES = new Set(['none', 'free', 'trial'])const isProduction = () =>typeof window === 'undefined'@@ -322,7 +323,7 @@ export const PLAN_ENTITLEMENTS = {websites: 50,teamMembers: 10,organisations: 3,- apiRateLimitPerHour: 600,+ apiRateLimitPerHour: 300,sessionReplaysIncluded: 0,featureKeys: ['pricing.benefits.eventsAndGoals',@@ -342,7 +343,7 @@ export const PLAN_ENTITLEMENTS = {websites: 100,teamMembers: 25,organisations: 10,- apiRateLimitPerHour: 5000,+ apiRateLimitPerHour: 6000,sessionReplaysIncluded: 'byEventTier',sessionReplayQuota: {'100k': 5000,@@ -594,6 +595,10 @@ export const getEffectivePlanType = (planType?: string | null,_planCode?: string | null,): PlanTypeCode => {+ if (_planCode && UNPAID_PLAN_CODES.has(_planCode)) {+ return 'standard'+ }+if (planType && planType in PLAN_TYPES) {return planType as PlanTypeCode}diff --git a/web/app/pages/Subscribe/Subscribe.tsx b/web/app/pages/Subscribe/Subscribe.tsxindex 012872c58..541ce371e 100644--- a/web/app/pages/Subscribe/Subscribe.tsx+++ b/web/app/pages/Subscribe/Subscribe.tsx@@ -472,7 +472,12 @@ const Subscribe = () => {<>{currency.symbol}{formatPrice(monthlyPrice)}- <Text as='span' size='sm' colour='secondary' weight='medium'>+ <Text+ as='span'+ size='sm'+ colour='secondary'+ weight='medium'+ >/{t('pricing.perMonth')}</Text></>diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex 6dda32333..fe3e7a1aa 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -3036,6 +3036,7 @@},"benefits": {"funnels": "Funnels",+ "everythingFrom": "everything from {{plan}}","unlimitedMembers": "Unlimited members","eventsAndGoals": "Events & Goals","sessionUserProfileAnalysis": "Session & User profile analysis",