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!

frequently asked questions

Blue Mouse646499c90f14
diff --git a/web/app/routes/_index.tsx b/web/app/routes/_index.tsx
index 2931d0dbf..401f5ae41 100644
--- a/web/app/routes/_index.tsx
+++ b/web/app/routes/_index.tsx
@@ -37,6 +37,10 @@ import {
OS_LOGO_MAP,
OS_LOGO_MAP_DARK,
BROWSER_LOGO_MAP,
+ DOCS_URL,
+ DISCORD_URL,
+ PLAN_LIMITS,
+ TRIAL_DAYS,
} from '~/lib/constants'
import { DEFAULT_METAINFO, Metainfo } from '~/lib/models/Metainfo'
import { Stats } from '~/lib/models/Stats'
@@ -403,43 +407,38 @@ const Hero = () => {
const FAQ = () => {
const { t } = useTranslation('common')
- const faqs = [
- { q: 'Is Swetrix cookie-less?', a: 'Yes. We do not use cookies and we are fully GDPR-compliant.' },
- { q: 'Can I self-host?', a: 'Yes. Swetrix is open-source and provides a self-hostable edition.' },
- {
- q: 'Do you support e‑commerce events?',
- a: 'Yes. You can send custom events and properties to track sales and funnels.',
- },
- { q: 'Is there a free trial?', a: 'Yes. You can try Swetrix free for 14 days, no credit card required.' },
- { q: 'Can I export my data?', a: 'Yes. You own your data and can export it any time.' },
- ]
-
const [open, setOpen] = useState<number | null>(0)
+ const onLinkClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
+ e.stopPropagation()
+ }
+
return (
- <section className='relative mx-auto max-w-7xl px-6 py-14 lg:px-8'>
- <div aria-hidden className='pointer-events-none absolute inset-0 -z-10'>
- <div className='absolute inset-2 bottom-0 rounded-4xl bg-linear-115 from-[#d6e7ff] via-transparent to-[#f9d2ff] opacity-40 ring-1 ring-black/5 ring-inset sm:bg-linear-145 dark:opacity-25 dark:ring-white/10' />
- </div>
+ <section className='relative mx-auto max-w-5xl px-6 py-14 lg:px-8'>
<h2 className='text-center text-3xl font-extrabold text-slate-900 sm:text-4xl dark:text-white'>
{t('main.faq.title')}
</h2>
- <div className='mt-8 divide-y rounded-xl bg-white ring-1 ring-black/5 dark:divide-white/10 dark:bg-slate-800 dark:ring-white/10'>
- {faqs.map((item, idx) => {
+ <div className='mt-8 flex flex-col'>
+ {/* @ts-expect-error I'm not even sure why there is an error here */}
+ {_map(t('main.faq.items', { returnObjects: true }), (item: { q: string; a: string }, idx: number) => {
const expanded = open === idx
+ const showTopBorder = idx !== 0
+
return (
<button
key={item.q}
onClick={() => setOpen(expanded ? null : idx)}
- className='w-full text-left'
+ className={cn('group w-full text-left', showTopBorder && 'border-t border-gray-200 dark:border-white/10')}
aria-expanded={expanded}
>
<div className='flex items-center justify-between px-5 py-4'>
- <span className='text-base font-medium text-slate-900 dark:text-gray-100'>{item.q}</span>
- <ArrowRightIcon
+ <span className='text-base font-medium text-slate-900 group-hover:underline dark:text-gray-100'>
+ <Trans t={t} i18nKey={`main.faq.items.${idx}.q`} />
+ </span>
+ <ChevronDownIcon
className={cn(
- 'h-5 w-5 text-slate-600 transition-transform dark:text-gray-300',
- expanded && 'rotate-90',
+ 'size-4 text-slate-900 transition-transform dark:text-gray-300',
+ expanded && 'rotate-180',
)}
/>
</div>
@@ -449,7 +448,55 @@ const FAQ = () => {
transition={{ duration: 0.2 }}
className='overflow-hidden px-5'
>
- <p className='pb-4 text-sm text-slate-700 dark:text-gray-300'>{item.a}</p>
+ <p className='pb-4 text-sm whitespace-pre-line text-slate-700 dark:text-gray-300'>
+ <Trans
+ t={t}
+ i18nKey={`main.faq.items.${idx}.a`}
+ values={{
+ lowestPlanEventsAmount: PLAN_LIMITS.hobby.monthlyUsageLimit.toLocaleString('en-US'),
+ moderatePlanEventsAmount: PLAN_LIMITS.freelancer.monthlyUsageLimit.toLocaleString('en-US'),
+ freeTrialDays: TRIAL_DAYS,
+ }}
+ components={{
+ dataPolicyUrl: (
+ <Link
+ to={routesPath.dataPolicy}
+ className='underline decoration-dashed hover:decoration-solid'
+ aria-label='Data policy'
+ onClick={onLinkClick}
+ />
+ ),
+ apiDocumentationUrl: (
+ <a
+ href={DOCS_URL}
+ className='underline decoration-dashed hover:decoration-solid'
+ target='_blank'
+ rel='noopener noreferrer'
+ aria-label='API documentation (opens in a new tab)'
+ onClick={onLinkClick}
+ />
+ ),
+ contactUsUrl: (
+ <Link
+ to={routesPath.contact}
+ className='underline decoration-dashed hover:decoration-solid'
+ aria-label='Contact us'
+ onClick={onLinkClick}
+ />
+ ),
+ discordUrl: (
+ <a
+ href={DISCORD_URL}
+ className='underline decoration-dashed hover:decoration-solid'
+ target='_blank'
+ rel='noopener noreferrer'
+ aria-label='Discord (opens in a new tab)'
+ onClick={onLinkClick}
+ />
+ ),
+ }}
+ />
+ </p>
</motion.div>
</button>
)
@@ -471,11 +518,11 @@ export default function Index() {
<FeaturesShowcase />
- <FAQ />
-
{/* Hiding the Pricing for authenticated users on the main page as the Paddle script only loads on the Billing page */}
{!isAuthenticated ? <Pricing authenticated={false} /> : null}
+ <FAQ />
+
<WeAreOpensource />
<DitchGoogle />
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 01449bd12..247e0be6b 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -354,7 +354,41 @@
"main": {
"seeLiveDemo": "See the live demo",
"faq": {
- "title": "Frequently asked questions"
+ "title": "Frequently asked questions",
+ "items": [
+ {
+ "q": "What plan should I choose?",
+ "a": "You can start with the {{lowestPlanEventsAmount}} events per month plan. If you already have some traffic, you can start with the {{moderatePlanEventsAmount}} events per month plan.\n\n In any case, you can upgrade or downgrade your plan anytime, and we will pro-rate your subscription if you change your plan so it would be fair for you."
+ },
+ {
+ "q": "What happens if I exceed my plan's limit?",
+ "a": "We won't stop counting your data if you exceed your plan's limit. However, you will need to upgrade to a higher plan to keep access to your stats.\n\nWe will send you an email notification if you exceed or come close to your plan's limit. We also won't restrict your dashboard if you get an occasional traffic spike or go over your limit slightly."
+ },
+ {
+ "q": "Does Swetrix offer a free plan?",
+ "a": "For our cloud version, we don't offer a free plan at this moment. We're an independent startup funded solely by our subscribers. We don't monetise or sell your data, so subscription fee is needed to cover our costs and keep the service running.\n\nAt the same time, Swetrix is open-source and we provide a Community Edition that you can self-host on your own infrastructure for free."
+ },
+ {
+ "q": "Is there a free trial?",
+ "a": "Yep, you can try Swetrix for free for {{freeTrialDays}} days, no credit card required!"
+ },
+ {
+ "q": "Is Swetrix GDPR-compliant?",
+ "a": "Swetrix is a privacy-focused web analytics tool. We do not use cookies for tracking, and all the data is collected anonymously. We don't use persistent, cross-device tracking, and don't use your data for any other purposes. You can read more about it in our <dataPolicyUrl>data policy</dataPolicyUrl>."
+ },
+ {
+ "q": "Does Swetrix have an API?",
+ "a": "Yes, you can access access your statistics or website data using our API. And you can also send pageviews or events for your websites using our API. Learn more about it in our <apiDocumentationUrl>API documentation</apiDocumentationUrl>."
+ },
+ {
+ "q": "Can I invite my team members to Swetrix?",
+ "a": "Yes! You can create an organisation and invite your team members to it, assign them roles and easily manage their access to the organisation and its projects.\n\nYou can invite people directly to your projects, create password-protected access links or make your projects public and accessible to everyone."
+ },
+ {
+ "q": "What support do you provide?",
+ "a": "We provide email support and you can <contactUsUrl>contact us</contactUsUrl> at any time. We also offer a community support on our <discordUrl>Discord server</discordUrl>."
+ }
+ ]
},
"ukrSupport": "Support the Ukrainian army to fight Russian invasion.",
"slogan": "Turn traffic into insights",