📈 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
Add tooltips to explain what project members mean
Blue Mouse68530a8d8868
diff --git a/web/app/components/pricing/MarketingPricing.tsx b/web/app/components/pricing/MarketingPricing.tsxindex 0b8286840..0eb46813b 100644--- a/web/app/components/pricing/MarketingPricing.tsx+++ b/web/app/components/pricing/MarketingPricing.tsx@@ -62,6 +62,7 @@ import { cn } from '~/utils/generic'import routes from '~/utils/routes'import SessionReplayPricingTooltip from './SessionReplayPricingTooltip'+import TeamMembersPricingTooltip from './TeamMembersPricingTooltip'interface MarketingPricingProps {metainfo?: Metainfo@@ -99,7 +100,7 @@ interface Benefit {icon: Iconlabel: stringtooltip?: BenefitTooltip- tooltipType?: 'sessionReplays'+ tooltipType?: 'sessionReplays' | 'teamMembers'}const planCards: PlanTypeCode[] = ['standard', 'plus', 'enterprise']@@ -201,6 +202,7 @@ const getBenefits = (planType: PlanTypeCode, t: TFunction): Benefit[] => {{icon: UsersThreeIcon,label: t('pricing.teamMemberCount', { count: 10 }),+ tooltipType: 'teamMembers',},benefitWithTooltip(DownloadSimpleIcon,@@ -298,6 +300,7 @@ const getBenefits = (planType: PlanTypeCode, t: TFunction): Benefit[] => {{icon: UsersThreeIcon,label: t('pricing.teamMemberCount', { count: 25 }),+ tooltipType: 'teamMembers',},{icon: MonitorPlayIcon,@@ -443,6 +446,9 @@ const BenefitRow = ({{benefit.tooltipType === 'sessionReplays' ? (<SessionReplayPricingTooltip className={isEnterprise ? 'dark' : ''} />) : null}+ {benefit.tooltipType === 'teamMembers' ? (+ <TeamMembersPricingTooltip className={isEnterprise ? 'dark' : ''} />+ ) : null}{benefit.tooltip ? (<TooltipariaLabel={benefit.tooltip.ariaLabel}diff --git a/web/app/components/pricing/PricingComparisonTable.tsx b/web/app/components/pricing/PricingComparisonTable.tsxindex 7de9ac029..7fdbbe8af 100644--- a/web/app/components/pricing/PricingComparisonTable.tsx+++ b/web/app/components/pricing/PricingComparisonTable.tsx@@ -19,6 +19,8 @@ import Tooltip from '~/ui/Tooltip'import { cn } from '~/utils/generic'import routes from '~/utils/routes'+import TeamMembersPricingTooltip from './TeamMembersPricingTooltip'+const STARTER_TIER: EventTierCode = '100k'type CellValue = boolean | { key: string; tooltip?: string }@@ -27,6 +29,7 @@ interface FeatureRow {label: stringtooltip?: stringtooltipHref?: string+ tooltipType?: 'teamMembers'values: [CellValue, CellValue, CellValue]}@@ -80,6 +83,7 @@ const getCategories = (t: TFunction): FeatureCategory[] => [},{label: t('pricing.comparison.features.teamMembers'),+ tooltipType: 'teamMembers',values: [{ key: 'pricing.comparison.values.teamMembersStandard' },{ key: 'pricing.comparison.values.teamMembersPlus' },@@ -550,6 +554,9 @@ const FeatureCategoryRows = ({className='shrink-0'/>) : null}+ {row.tooltipType === 'teamMembers' ? (+ <TeamMembersPricingTooltip className='shrink-0' />+ ) : null}</span></th>{row.values.map((value, valueIndex) => (diff --git a/web/app/components/pricing/TeamMembersPricingTooltip.tsx b/web/app/components/pricing/TeamMembersPricingTooltip.tsxnew file mode 100644index 000000000..398e7db98--- /dev/null+++ b/web/app/components/pricing/TeamMembersPricingTooltip.tsx@@ -0,0 +1,50 @@+import { useTranslation } from 'react-i18next'++import { DOCS_URL } from '~/lib/constants'+import Tooltip from '~/ui/Tooltip'++interface TeamMembersPricingTooltipProps {+ className?: string+}++const TeamMembersPricingTooltip = ({+ className,+}: TeamMembersPricingTooltipProps) => {+ const { t } = useTranslation('common')++ return (+ <Tooltip+ ariaLabel={`${t('common.learnMore')}: ${t('pricing.comparison.features.teamMembers')}`}+ className={className}+ contentClassName='max-w-[calc(100vw-2rem)] sm:max-w-80'+ text={+ <span className='block space-y-2 text-pretty'>+ <span className='block'>+ {t('pricing.benefits.tooltips.teamMembers.projects')}{' '}+ <a+ href={`${DOCS_URL}/how-to-invite-users-to-your-website`}+ className='font-semibold underline decoration-dashed hover:decoration-solid'+ target='_blank'+ rel='noreferrer noopener'+ >+ {t('common.learnMore')}+ </a>+ </span>+ <span className='block'>+ {t('pricing.benefits.tooltips.teamMembers.organisations')}{' '}+ <a+ href={`${DOCS_URL}/teams-api-integrations#organisations-teams`}+ className='font-semibold underline decoration-dashed hover:decoration-solid'+ target='_blank'+ rel='noreferrer noopener'+ >+ {t('common.learnMore')}+ </a>+ </span>+ </span>+ }+ />+ )+}++export default TeamMembersPricingTooltipdiff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex a1b69a3b3..8aa7a1d69 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -3333,6 +3333,10 @@"featureFlags": "Roll features out gradually, target cohorts or individual users, and turn changes off without another deploy.","abTesting": "Run experiments against goals, split visitors across variants, and compare conversion results before shipping a change to everyone.","twentyXHigherApiRateLimits": "Standard plans include 300 API requests per hour. Plus plans include 6,000 API requests per hour, which is 20x higher.",+ "teamMembers": {+ "projects": "Members are people you invite to your projects, such as teammates or clients. Give them admin or viewer access to collaborate on your analytics.",+ "organisations": "You can also create organisations, group your projects, and invite people to access all projects in an organisation with a shared role."+ },"plusWebsites": "Swetrix has no limit on the number of websites you can add. You can purchase more websites via add-ons. Bulk discounts are available if you contact support.","customEventLimits": "Enterprise plans are flexible for event limits, API rate limits, and project quantity.","onPremise": "Our team installs Swetrix in your own infrastructure and manages the installation, maintenance, and updates for you.",