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!

feature: Onboarding

Blue Mousead422dddcaa0
diff --git a/backend/apps/cloud/src/user/entities/user.entity.ts b/backend/apps/cloud/src/user/entities/user.entity.ts
index 0428bc33c..ce383d18e 100644
--- a/backend/apps/cloud/src/user/entities/user.entity.ts
+++ b/backend/apps/cloud/src/user/entities/user.entity.ts
@@ -197,6 +197,13 @@ export enum TimeFormat {
'24-hour' = '24-hour',
}
+export enum OnboardingStep {
+ CREATE_PROJECT = 'create_project',
+ SETUP_TRACKING = 'setup_tracking',
+ WAITING_FOR_EVENTS = 'waiting_for_events',
+ COMPLETED = 'completed',
+}
+
export const MAX_EMAIL_REQUESTS = 4 // 1 confirmation email on sign up + 3 additional ones
export const DEFAULT_TIMEZONE = 'Etc/GMT'
@@ -421,6 +428,16 @@ export class User {
})
timeFormat: TimeFormat
+ @Column({
+ type: 'enum',
+ enum: OnboardingStep,
+ default: OnboardingStep.CREATE_PROJECT,
+ })
+ onboardingStep: OnboardingStep
+
+ @Column({ default: false })
+ hasCompletedOnboarding: boolean
+
// Google SSO
@Column({
type: 'varchar',
diff --git a/backend/apps/cloud/src/user/user.controller.ts b/backend/apps/cloud/src/user/user.controller.ts
index 26f614876..e1eff739a 100644
--- a/backend/apps/cloud/src/user/user.controller.ts
+++ b/backend/apps/cloud/src/user/user.controller.ts
@@ -49,6 +49,7 @@ import {
PlanCode,
Theme,
FeatureFlag,
+ OnboardingStep,
} from './entities/user.entity'
import { Pagination } from '../common/pagination/pagination'
import {
@@ -1144,4 +1145,34 @@ export class UserController {
reportFrequency: ReportFrequency.NEVER,
})
}
+
+ @ApiBearerAuth()
+ @Post('onboarding/step')
+ @UseGuards(JwtAccessTokenGuard, RolesGuard)
+ @Roles(UserType.CUSTOMER, UserType.ADMIN)
+ @ApiResponse({ status: 204 })
+ async updateOnboardingStep(
+ @CurrentUserId() userId: string,
+ @Body('step') step: OnboardingStep,
+ ): Promise<void> {
+ this.logger.log({ userId, step }, 'POST /user/onboarding/step')
+
+ await this.userService.update(userId, {
+ onboardingStep: step,
+ })
+ }
+
+ @ApiBearerAuth()
+ @Post('onboarding/complete')
+ @UseGuards(JwtAccessTokenGuard, RolesGuard)
+ @Roles(UserType.CUSTOMER, UserType.ADMIN)
+ @ApiResponse({ status: 204 })
+ async completeOnboarding(@CurrentUserId() userId: string): Promise<void> {
+ this.logger.log({ userId }, 'POST /user/onboarding/complete')
+
+ await this.userService.update(userId, {
+ onboardingStep: OnboardingStep.COMPLETED,
+ hasCompletedOnboarding: true,
+ })
+ }
}
diff --git a/backend/migrations/mysql/2025_07_30.sql b/backend/migrations/mysql/2025_07_30.sql
new file mode 100644
index 000000000..2b7d15808
--- /dev/null
+++ b/backend/migrations/mysql/2025_07_30.sql
@@ -0,0 +1,5 @@
+ALTER TABLE user ADD COLUMN `onboardingStep` enum('create_project','setup_tracking','waiting_for_events','completed') NOT NULL DEFAULT 'create_project' AFTER timeFormat;
+ALTER TABLE user ADD COLUMN `hasCompletedOnboarding` tinyint NOT NULL DEFAULT '0' AFTER onboardingStep;
+
+-- Mark all existing users as having completed the onboarding
+UPDATE user SET `onboardingStep` = 'completed', `hasCompletedOnboarding` = '1';
diff --git a/web/app/api/index.ts b/web/app/api/index.ts
index 580399bfc..ade7fdb20 100644
--- a/web/app/api/index.ts
+++ b/web/app/api/index.ts
@@ -266,11 +266,11 @@ export const verifyShare = ({ path, id }: { path: string; id: string }) =>
export const getProjects = (
take = 0,
skip = 0,
- search?: string,
- mode?: string,
- period?: string,
- useHostnameNavigation?: boolean,
- sort?: string,
+ search = '',
+ mode = 'default',
+ period = '7d',
+ useHostnameNavigation = false,
+ sort = 'alpha_asc',
) =>
api
.get(
@@ -1517,3 +1517,19 @@ export const setFeatureFlags = (featureFlags: FeatureFlag[]) =>
.catch((error) => {
throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
})
+
+export const updateOnboardingStep = (step: string) =>
+ api
+ .post('/user/onboarding/step', { step })
+ .then((response): User => response.data)
+ .catch((error) => {
+ throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
+ })
+
+export const completeOnboarding = () =>
+ api
+ .post('/user/onboarding/complete')
+ .then((response): User => response.data)
+ .catch((error) => {
+ throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
+ })
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.ts
index 76b96a627..adf4264a0 100644
--- a/web/app/lib/constants/index.ts
+++ b/web/app/lib/constants/index.ts
@@ -349,6 +349,7 @@ export const PERFORMANCE_LIVE_DEMO_URL = '/projects/STEzHcB1rALV?tab=performance
export const ERROR_TRACKING_LIVE_DEMO_URL = '/projects/STEzHcB1rALV?tab=errors'
export const MARKETPLACE_URL = 'https://marketplace.swetrix.com'
export const DOCS_URL = 'https://docs.swetrix.com'
+export const INTEGRATIONS_URL = 'https://docs.swetrix.com/integrations'
export const ERROR_TRACKING_DOCS_URL = 'https://docs.swetrix.com/error-tracking'
export const CAPTCHA_URL = 'https://captcha.swetrix.com'
export const DOCS_CAPTCHA_URL = `${DOCS_URL}/captcha/introduction`
diff --git a/web/app/lib/models/User.ts b/web/app/lib/models/User.ts
index 6e34158e2..3bfa2e42f 100644
--- a/web/app/lib/models/User.ts
+++ b/web/app/lib/models/User.ts
@@ -28,6 +28,14 @@ export enum FeatureFlag {
'dashboard-hostname-cards' = 'dashboard-hostname-cards',
}
+export enum OnboardingStep {
+ WELCOME = 'welcome',
+ CREATE_PROJECT = 'create_project',
+ SETUP_TRACKING = 'setup_tracking',
+ WAITING_FOR_EVENTS = 'waiting_for_events',
+ COMPLETED = 'completed',
+}
+
export interface User {
id: string
roles: string[]
@@ -75,4 +83,6 @@ export interface User {
dashboardBlockReason: DashboardBlockReason
isAccountBillingSuspended: boolean
organisationMemberships: OrganisationMembership[]
+ onboardingStep: OnboardingStep
+ hasCompletedOnboarding: boolean
}
diff --git a/web/app/modals/TrackingSnippet.tsx b/web/app/modals/TrackingSnippet.tsx
index 4539ec768..0dc2d8d52 100644
--- a/web/app/modals/TrackingSnippet.tsx
+++ b/web/app/modals/TrackingSnippet.tsx
@@ -13,7 +13,7 @@ interface TrackingSnippetProps {
isOpened: boolean
}
-const getSnippet = (pid: string) => {
+export const getSnippet = (pid: string) => {
if (isSelfhosted) {
return `<script src="https://swetrix.org/swetrix.js" defer></script>
<script>
@@ -74,7 +74,14 @@ const TrackingSnippet = ({ onClose, isOpened }: TrackingSnippetProps) => {
}}
/>
</p>
- <Textarea className='mt-2 font-mono' value={snippet} rows={17} readOnly />
+ <Textarea
+ classes={{
+ container: 'mt-2 font-mono',
+ }}
+ value={snippet}
+ rows={17}
+ readOnly
+ />
<p className='mt-4'>
<Trans
t={t}
diff --git a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
deleted file mode 100644
index 805697452..000000000
--- a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { EnvelopeIcon } from '@heroicons/react/24/outline'
-import { useMemo, useEffect } from 'react'
-import { useTranslation, Trans } from 'react-i18next'
-import { useNavigate } from 'react-router'
-
-import { withAuthentication } from '~/hoc/protected'
-import { useAuth } from '~/providers/AuthProvider'
-import Loader from '~/ui/Loader'
-import routes from '~/utils/routes'
-
-const CheckYourInbox = () => {
- const { t } = useTranslation('common')
- const { user, isLoading, logout } = useAuth()
- const navigate = useNavigate()
-
- const message = useMemo(() => {
- return t('auth.confirm.linkSent', { email: user?.email })
- }, [t, user?.email])
-
- useEffect(() => {
- if (user?.isActive) {
- navigate(routes.dashboard)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [user?.isActive])
-
- if (isLoading) {
- return (
- <div className='min-h-min-footer bg-gray-50 dark:bg-slate-900'>
- <Loader />
- </div>
- )
- }
-
- if (user?.isActive) {
- return <></>
- }
-
- return (
- <div className='min-h-min-footer bg-gray-50 px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8 dark:bg-slate-900'>
- <div className='mx-auto max-w-max'>
- <main className='sm:flex'>
- <EnvelopeIcon className='mb-2 -ml-1.5 h-12 w-auto text-indigo-500 sm:m-0 sm:h-24 dark:text-indigo-600' />
- <div className='sm:ml-6'>
- <div className='sm:border-l sm:border-gray-200 sm:pl-6'>
- <h1 className='text-4xl font-extrabold text-gray-900 sm:text-5xl dark:text-gray-50'>
- {t('auth.confirm.title')}
- </h1>
- <p className='mt-1 max-w-prose text-base whitespace-pre-line text-gray-700 dark:text-gray-300'>
- {message}
- </p>
- <p className='mt-4 max-w-prose text-sm whitespace-pre-line text-gray-700 dark:text-gray-300'>
- {t('auth.confirm.spam')}
- </p>
- <p className='max-w-prose text-sm whitespace-pre-line text-gray-700 dark:text-gray-300'>
- <Trans
- t={t}
- i18nKey='auth.confirm.wrongEmail'
- components={{
- url: (
- <span
- tabIndex={0}
- role='button'
- className='cursor-pointer font-medium text-indigo-600 hover:underline dark:text-indigo-400'
- onClick={() => {
- logout()
- }}
- />
- ),
- }}
- />
- </p>
- </div>
- </div>
- </main>
- </div>
- </div>
- )
-}
-
-export default withAuthentication(CheckYourInbox, {
- shouldBeAuthenticated: true,
- redirectPath: routes.signup,
-})
diff --git a/web/app/pages/Auth/CheckYourInbox/index.tsx b/web/app/pages/Auth/CheckYourInbox/index.tsx
deleted file mode 100644
index 256d8f1d0..000000000
--- a/web/app/pages/Auth/CheckYourInbox/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import CheckYourInbox from './CheckYourInbox'
-
-export default CheckYourInbox
diff --git a/web/app/pages/Auth/Signin/Signin.tsx b/web/app/pages/Auth/Signin/Signin.tsx
index 75413abba..af4726f06 100644
--- a/web/app/pages/Auth/Signin/Signin.tsx
+++ b/web/app/pages/Auth/Signin/Signin.tsx
@@ -136,7 +136,12 @@ const Signin = () => {
setAccessToken(accessToken, false)
setRefreshToken(refreshToken)
- navigate(routes.dashboard)
+ // Redirect to onboarding if user hasn't completed it
+ if (!user.hasCompletedOnboarding) {
+ navigate(routes.onboarding)
+ } else {
+ navigate(routes.dashboard)
+ }
return
} catch {
@@ -183,6 +188,13 @@ const Signin = () => {
setRefreshToken(refreshToken)
setIsLoading(false)
+
+ // Redirect to onboarding if user hasn't completed it
+ if (!user.hasCompletedOnboarding) {
+ navigate(routes.onboarding)
+ } else {
+ navigate(routes.dashboard)
+ }
} catch (reason) {
toast.error(typeof reason === 'string' ? reason : t('apiNotifications.somethingWentWrong'))
setIsLoading(false)
diff --git a/web/app/pages/Auth/Signup/Signup.tsx b/web/app/pages/Auth/Signup/Signup.tsx
index 18c82870f..56967337b 100644
--- a/web/app/pages/Auth/Signup/Signup.tsx
+++ b/web/app/pages/Auth/Signup/Signup.tsx
@@ -134,7 +134,7 @@ const Signup = () => {
trackCustom('SIGNUP', {
from: 'Signup page',
})
- navigate(routes.confirm_email)
+ navigate(routes.onboarding)
} catch (reason) {
toast.error(typeof reason === 'string' ? reason : t('apiNotifications.somethingWentWrong'))
setIsLoading(false)
@@ -186,7 +186,12 @@ const Signup = () => {
setAccessToken(accessToken, false)
setRefreshToken(refreshToken)
- navigate(routes.dashboard)
+ // Redirect to onboarding if user hasn't completed it
+ if (!user.hasCompletedOnboarding) {
+ navigate(routes.onboarding)
+ } else {
+ navigate(routes.dashboard)
+ }
return
} catch {
diff --git a/web/app/pages/Auth/VerifyEmail/index.tsx b/web/app/pages/Auth/VerifyEmail/index.tsx
index 2fee0bc56..2993c7dbc 100644
--- a/web/app/pages/Auth/VerifyEmail/index.tsx
+++ b/web/app/pages/Auth/VerifyEmail/index.tsx
@@ -91,10 +91,10 @@ const VerifyEmail = () => {
</div>
<div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
<Link
- to={routes.dashboard}
+ to={routes.onboarding}
className='inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden'
>
- {t('common.dashboard')}
+ {t('auth.verification.continueToOnboarding')}
</Link>
</div>
</div>
diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsx
index 3067110d0..74d0a1112 100644
--- a/web/app/pages/Dashboard/Dashboard.tsx
+++ b/web/app/pages/Dashboard/Dashboard.tsx
@@ -7,7 +7,7 @@ import _size from 'lodash/size'
import { StretchHorizontal as StretchHorizontalIcon, LayoutGrid as LayoutGridIcon } from 'lucide-react'
import React, { useState, useEffect, useRef, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
-import { Link, useLoaderData, useSearchParams } from 'react-router'
+import { Link, useLoaderData, useNavigate, useSearchParams } from 'react-router'
import { ClientOnly } from 'remix-utils/client-only'
import { getProjects, getLiveVisitors, getOverallStats, getOverallStatsCaptcha } from '~/api'
@@ -43,6 +43,7 @@ const DASHBOARD_VIEW = {
const Dashboard = () => {
const { viewMode: defaultViewMode } = useLoaderData<any>()
const { user, isLoading: authLoading } = useAuth()
+ const navigate = useNavigate()
const showPeriodSelector = useFeatureFlag(FeatureFlag['dashboard-period-selector'])
const showTabs = useFeatureFlag(FeatureFlag['dashboard-analytics-tabs'])
const isHostnameNavigationEnabled = useFeatureFlag(FeatureFlag['dashboard-hostname-cards'])
@@ -191,6 +192,14 @@ const Dashboard = () => {
}
}
+ // Redirect to onboarding if user hasn't completed it
+ useEffect(() => {
+ if (user && !user.hasCompletedOnboarding) {
+ navigate(routes.onboarding)
+ return
+ }
+ }, [user, navigate])
+
useEffect(() => {
if (authLoading) {
return
diff --git a/web/app/pages/Landings/Marketers.tsx b/web/app/pages/Landings/Marketers.tsx
index 7b093f310..4c1bb08bb 100644
--- a/web/app/pages/Landings/Marketers.tsx
+++ b/web/app/pages/Landings/Marketers.tsx
@@ -6,12 +6,10 @@ import { Link } from 'react-router'
import Header from '~/components/Header'
import { ComparisonTable } from '~/components/marketing/ComparisonTable'
import { DitchGoogle } from '~/components/marketing/DitchGoogle'
-import { BOOK_A_CALL_URL, DISCORD_URL, LIVE_DEMO_URL } from '~/lib/constants'
+import { BOOK_A_CALL_URL, DISCORD_URL, INTEGRATIONS_URL, LIVE_DEMO_URL } from '~/lib/constants'
import { useTheme } from '~/providers/ThemeProvider'
import routesPath from '~/utils/routes'
-const INTEGRATIONS_URL = 'https://docs.swetrix.com/integrations'
-
const Marketers = () => {
const { t } = useTranslation('common')
const { theme } = useTheme()
diff --git a/web/app/pages/Landings/SmallBusinesses.tsx b/web/app/pages/Landings/SmallBusinesses.tsx
index 0e348b1af..144489b6b 100644
--- a/web/app/pages/Landings/SmallBusinesses.tsx
+++ b/web/app/pages/Landings/SmallBusinesses.tsx
@@ -6,12 +6,10 @@ import { Link } from 'react-router'
import Header from '~/components/Header'
import { ComparisonTable } from '~/components/marketing/ComparisonTable'
import { DitchGoogle } from '~/components/marketing/DitchGoogle'
-import { BOOK_A_CALL_URL, DISCORD_URL, LIVE_DEMO_URL, TWITTER_URL } from '~/lib/constants'
+import { BOOK_A_CALL_URL, DISCORD_URL, LIVE_DEMO_URL, TWITTER_URL, INTEGRATIONS_URL } from '~/lib/constants'
import { useTheme } from '~/providers/ThemeProvider'
import routesPath from '~/utils/routes'
-const INTEGRATIONS_URL = 'https://docs.swetrix.com/integrations'
-
const SmallBusinesses = () => {
const { t } = useTranslation('common')
const { theme } = useTheme()
diff --git a/web/app/pages/Landings/Startups.tsx b/web/app/pages/Landings/Startups.tsx
index 924850d68..b9d992d35 100644
--- a/web/app/pages/Landings/Startups.tsx
+++ b/web/app/pages/Landings/Startups.tsx
@@ -6,12 +6,10 @@ import { Link } from 'react-router'
import Header from '~/components/Header'
import { ComparisonTable } from '~/components/marketing/ComparisonTable'
import { DitchGoogle } from '~/components/marketing/DitchGoogle'
-import { BOOK_A_CALL_URL, DISCORD_URL, LIVE_DEMO_URL } from '~/lib/constants'
+import { BOOK_A_CALL_URL, DISCORD_URL, LIVE_DEMO_URL, INTEGRATIONS_URL } from '~/lib/constants'
import { useTheme } from '~/providers/ThemeProvider'
import routesPath from '~/utils/routes'
-const INTEGRATIONS_URL = 'https://docs.swetrix.com/integrations'
-
const Startups = () => {
const { t } = useTranslation('common')
const { theme } = useTheme()
diff --git a/web/app/pages/Onboarding/Onboarding.tsx b/web/app/pages/Onboarding/Onboarding.tsx
new file mode 100644
index 000000000..aaa84c259
--- /dev/null
+++ b/web/app/pages/Onboarding/Onboarding.tsx
@@ -0,0 +1,609 @@
+import { EnvelopeIcon } from '@heroicons/react/24/outline'
+import { CheckCircleIcon as CheckCircleIconSolid } from '@heroicons/react/24/solid'
+import cx from 'clsx'
+import type { TFunction } from 'i18next'
+import { ChevronRightIcon, LaptopMinimalIcon } from 'lucide-react'
+import { useState, useEffect, useMemo } from 'react'
+import { Trans, useTranslation } from 'react-i18next'
+import { Link, useNavigate } from 'react-router'
+import { toast } from 'sonner'
+
+import { updateOnboardingStep, completeOnboarding, createProject, authMe, getProjects } from '~/api'
+import { withAuthentication, auth } from '~/hoc/protected'
+import { DOCS_URL, INTEGRATIONS_URL } from '~/lib/constants'
+import { getSnippet } from '~/modals/TrackingSnippet'
+import { useAuth } from '~/providers/AuthProvider'
+import { Badge } from '~/ui/Badge'
+import Button from '~/ui/Button'
+import PulsatingCircle from '~/ui/icons/PulsatingCircle'
+import Input from '~/ui/Input'
+import Loader from '~/ui/Loader'
+import Textarea from '~/ui/Textarea'
+import { trackCustom } from '~/utils/analytics'
+import { logout } from '~/utils/auth'
+import routes from '~/utils/routes'
+
+import { MAX_PROJECT_NAME_LENGTH } from '../Project/New'
+
+const getOnboardingSteps = (t: TFunction) => [
+ {
+ id: 'confirm_email',
+ title: t('onboarding.confirm.navTitle'),
+ description: t('onboarding.confirm.navDesc'),
+ completed: false,
+ },
+ {
+ id: 'create_project',
+ title: t('onboarding.createProject.navTitle'),
+ description: t('onboarding.createProject.navDesc'),
+ completed: false,
+ },
+ {
+ id: 'setup_tracking',
+ title: t('onboarding.installTracking.navTitle'),
+ description: t('onboarding.installTracking.navDesc'),
+ completed: false,
+ },
+ {
+ id: 'waiting_for_events',
+ title: t('onboarding.verifyInstallation.navTitle'),
+ description: t('onboarding.verifyInstallation.navDesc'),
+ completed: false,
+ },
+]
+
+interface Project {
+ id: string
+ name: string
+}
+
+const Onboarding = () => {
+ const { t } = useTranslation('common')
+ const { user, loadUser } = useAuth()
+ const navigate = useNavigate()
+
+ const [currentStep, setCurrentStep] = useState(0)
+ const [isLoading, setIsLoading] = useState(false)
+ const [projectName, setProjectName] = useState('')
+ const [project, setProject] = useState<Project | null>(null)
+ const [isWaitingForEvents, setIsWaitingForEvents] = useState(false)
+ const [hasEvents, setHasEvents] = useState(false)
+
+ const [newProjectErrors, setNewProjectErrors] = useState<{
+ name?: string
+ }>({})
+
+ useEffect(() => {
+ if (user?.hasCompletedOnboarding) {
+ navigate(routes.dashboard)
+ return
+ }
+
+ const determineCurrentStep = async () => {
+ if (!user?.isActive) {
+ setCurrentStep(0)
+ return
+ }
+
+ if (!user?.onboardingStep) {
+ setCurrentStep(1)
+ return
+ }
+
+ switch (user.onboardingStep) {
+ case 'create_project':
+ setCurrentStep(1)
+ break
+ case 'setup_tracking':
+ setCurrentStep(2)
+ try {
+ const projectsData = await getProjects(1, 0)
+ if (projectsData.results.length > 0) {
+ setProject(projectsData.results[0])
+ setCurrentStep(2)
+ }
+ } catch (reason) {
+ console.error('Failed to get projects:', reason)
+ }
+ break
+ case 'waiting_for_events':
+ setCurrentStep(3)
+ setIsWaitingForEvents(true)
+ break
+ default:
+ setCurrentStep(1)
+ }
+ }
+
+ determineCurrentStep()
+ }, [user, navigate])
+
+ useEffect(() => {
+ if (!isWaitingForEvents || !project) return
+
+ const checkForEvents = async () => {
+ try {
+ const { totalMonthlyEvents } = await authMe()
+ if (totalMonthlyEvents > 0) {
+ setHasEvents(true)
+ setIsWaitingForEvents(false)
+ }
+ } catch (reason) {
+ console.error('Failed to check for events:', reason)
+ }
+ }
+
+ const interval = setInterval(checkForEvents, 3000)
+ return () => clearInterval(interval)
+ }, [isWaitingForEvents, project])
+
+ const updateUserStep = async (step: string) => {
+ try {
+ await updateOnboardingStep(step)
+ await loadUser()
+ } catch (reason) {
+ console.error('Failed to update onboarding step:', reason)
+ }
+ }
+
+ const handleCreateProject = async (e?: React.FormEvent<HTMLFormElement>) => {
+ e?.preventDefault()
+ e?.stopPropagation()
+
+ const trimmedName = projectName.trim()
+
+ if (!trimmedName) {
+ setNewProjectErrors({ name: t('project.settings.noNameError') })
+ return
+ }
+
+ if (trimmedName.length > MAX_PROJECT_NAME_LENGTH) {
+ setNewProjectErrors({ name: t('project.settings.pxCharsError', { amount: MAX_PROJECT_NAME_LENGTH }) })
+ return
+ }
+
+ setIsLoading(true)
+ try {
+ const newProject = await createProject({
+ name: trimmedName,
+ })
+
+ setProject(newProject)
+ await updateUserStep('setup_tracking')
+ setCurrentStep(2)
+
+ trackCustom('PROJECT_CREATED', {
+ from: 'onboarding',
+ })
+ } catch (reason) {
+ toast.error(typeof reason === 'string' ? reason : 'Failed to create project')
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ const handleCompleteOnboarding = async () => {
+ try {
+ await completeOnboarding()
+ await loadUser()
+
+ trackCustom('ONBOARDING_COMPLETED', {
+ skipped: !hasEvents,
+ })
+
+ navigate(routes.dashboard)
+ } catch (reason) {
+ console.error('Failed to complete onboarding:', reason)
+ toast.error(typeof reason === 'string' ? reason : t('apiNotifications.somethingWentWrong'))
+ }
+ }
+
+ const steps = useMemo(() => {
+ return getOnboardingSteps(t).map((step, index) => ({
+ ...step,
+ completed:
+ index < currentStep ||
+ (index === currentStep &&
+ ((index === 0 && user?.isActive) || // Email step is completed when user is active
+ (index === 3 && hasEvents))), // Events step is completed when we have events
+ current: index === currentStep,
+ }))
+ }, [t, currentStep, hasEvents, user?.isActive])
+
+ if (!user) {
+ return (
+ <div className='min-h-min-footer bg-gray-50 dark:bg-slate-900'>
+ <Loader />
+ </div>
+ )
+ }
+
+ const progressPercentage = (currentStep / (steps.length - 1)) * 100
+
+ return (
+ <div className='min-h-min-footer bg-gray-50 dark:bg-slate-900'>
+ <div className='flex min-h-screen'>
+ <div className='hidden md:block md:w-80 md:border-r md:border-gray-200 md:bg-white md:p-8 md:dark:border-slate-700 md:dark:bg-slate-800'>
+ <div className='mb-8'>
+ <div className='mb-2 text-sm font-medium text-gray-500 uppercase dark:text-gray-400'>
+ {t('onboarding.welcome')}
+ </div>
+ <h1 className='max-w-3xl text-2xl font-medium tracking-tight text-pretty text-gray-950 dark:text-gray-200'>
+ {t('onboarding.title')}
+ </h1>
+ </div>
+
+ <nav aria-label='Progress'>
+ <ol className='overflow-hidden'>
+ {steps.map((step, stepIdx) => {
+ const status = step.completed ? 'complete' : step.current ? 'current' : 'upcoming'
+
+ return (
+ <li key={step.id} className={cx(stepIdx !== steps.length - 1 ? 'pb-10' : '', 'relative')}>
+ {status === 'complete' ? (
+ <>
+ {stepIdx !== steps.length - 1 ? (
+ <div
+ aria-hidden='true'
+ className='absolute top-4 left-4 mt-0.5 -ml-px h-full w-0.5 bg-indigo-600'
+ />
+ ) : null}
+ <div className='group relative flex items-start'>
+ <span className='flex h-9 items-center'>
+ <span className='relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-indigo-600'>
+ <CheckCircleIconSolid aria-hidden='true' className='h-5 w-5 text-white' />
+ </span>
+ </span>
+ <span className='ml-4 flex min-w-0 flex-col'>
+ <span className='text-sm font-medium text-gray-900 dark:text-gray-50'>{step.title}</span>
+ <span className='text-sm text-gray-600 dark:text-gray-300'>{step.description}</span>
+ </span>
+ </div>
+ </>
+ ) : status === 'current' ? (
+ <>
+ {stepIdx !== steps.length - 1 ? (
+ <div
+ aria-hidden='true'
+ className='absolute top-4 left-4 mt-0.5 -ml-px h-full w-0.5 bg-gray-300 dark:bg-slate-600'
+ />
+ ) : null}
+ <div className='group relative flex items-start' aria-current='step'>
+ <span aria-hidden='true' className='flex h-9 items-center'>
+ <span className='relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-indigo-600 bg-white'>
+ <span className='h-2.5 w-2.5 rounded-full bg-indigo-600' />
+ </span>
+ </span>
+ <span className='ml-4 flex min-w-0 flex-col'>
+ <span className='text-sm font-medium text-indigo-600 dark:text-indigo-500'>
+ {step.title}
+ </span>
+ <span className='text-sm text-gray-600 dark:text-gray-300'>{step.description}</span>
+ </span>
+ </div>
+ </>
+ ) : (
+ <>
+ {stepIdx !== steps.length - 1 ? (
+ <div
+ aria-hidden='true'
+ className='absolute top-4 left-4 mt-0.5 -ml-px h-full w-0.5 bg-gray-300 dark:bg-slate-600'
+ />
+ ) : null}
+ <div className='group relative flex items-start'>
+ <span aria-hidden='true' className='flex h-9 items-center'>
+ <span className='relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-gray-300 bg-white group-hover:border-gray-400'>
+ <span className='h-2.5 w-2.5 rounded-full bg-transparent group-hover:bg-gray-300' />
+ </span>
+ </span>
+ <span className='ml-4 flex min-w-0 flex-col'>
+ <span className='text-sm font-medium text-gray-500 dark:text-gray-200/90'>
+ {step.title}
+ </span>
+ <span className='text-sm text-gray-600 dark:text-gray-300/70'>{step.description}</span>
+ </span>
+ </div>
+ </>
+ )}
+ </li>
+ )
+ })}
+ </ol>
+ </nav>
+
+ {/* We don't want users to skip the "Confirm your email" step until they've confirmed their email */}
+ {currentStep === 0 ? null : (
+ <div className='mt-8 border-t border-gray-200 pt-8 dark:border-slate-700'>
+ <button
+ type='button'
+ onClick={handleCompleteOnboarding}
+ className='flex items-center text-sm text-gray-800 hover:underline dark:text-gray-200'
+ >
+ {t('onboarding.skipOnboarding')}
+ <ChevronRightIcon className='ml-0.5 h-3.5 w-3.5' />
+ </button>
+ </div>
+ )}
+ </div>
+
+ <div className='flex-1 overflow-visible'>
+ <div className='max-w-3xl px-6 py-8 md:px-12'>
+ <div className='mb-8 block md:hidden'>
+ <h4 className='sr-only'>Progress</h4>
+ <p className='text-sm font-medium text-gray-900 dark:text-gray-50'>{steps[currentStep].title}</p>
+ <div aria-hidden='true' className='mt-4'>
+ <div className='overflow-hidden rounded-full bg-gray-200 dark:bg-slate-600'>
+ <div style={{ width: `${progressPercentage}%` }} className='h-2 rounded-full bg-indigo-600' />
+ </div>
+ </div>
+ </div>
+
+ {/* "Confirm your email" step */}
+ {currentStep === 0 ? (
+ <div>
+ <EnvelopeIcon className='mb-2 h-16 w-auto text-indigo-500 dark:text-indigo-600' />
+ <h1 className='max-w-3xl text-5xl/10 tracking-tight text-pretty text-gray-950 max-lg:font-medium dark:text-gray-200'>
+ {t('onboarding.confirm.title')}
+ </h1>
+ <p className='mt-6 max-w-prose text-base whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ {t('onboarding.confirm.linkSent', { email: user?.email })}
+ </p>
+ <p className='mt-4 max-w-prose text-sm whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ {t('onboarding.confirm.spam')}
+ </p>
+ <p className='max-w-prose text-sm whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ <Trans
+ t={t}
+ i18nKey='onboarding.confirm.wrongEmail'
+ components={{
+ url: (
+ <span
+ tabIndex={0}
+ role='button'
+ className='cursor-pointer font-medium text-indigo-600 hover:underline dark:text-indigo-400'
+ onClick={() => {
+ logout()
+ }}
+ />
+ ),
+ }}
+ />
+ </p>
+ </div>
+ ) : null}
+
+ {/* "Create a project" step */}
+ {currentStep === 1 ? (
+ <form onSubmit={handleCreateProject}>
+ <h1 className='max-w-3xl text-5xl/10 tracking-tight text-pretty text-gray-950 max-lg:font-medium dark:text-gray-200'>
+ {t('onboarding.createProject.title')}
+ </h1>
+ <p className='mt-6 max-w-prose text-base whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ {t('onboarding.createProject.desc')}
+ </p>
+
+ <div className='mt-6'>
+ <Input
+ label={t('project.settings.name')}
+ placeholder='My awesome website'
+ maxLength={MAX_PROJECT_NAME_LENGTH}
+ value={projectName}
+ onChange={(e) => {
+ setProjectName(e.target.value)
+ setNewProjectErrors({})
+ }}
+ error={newProjectErrors.name}
+ />
+ </div>
+
+ <div className='mt-6 flex justify-end'>
+ <Button type='submit' loading={isLoading} primary large>
+ {t('common.continue')}
+ </Button>
+ </div>
+ </form>
+ ) : null}
+
+ {/* "Install tracking script" step */}
+ {currentStep === 2 && project ? (
+ <div>
+ <h1 className='max-w-3xl text-5xl/10 tracking-tight text-pretty text-gray-950 max-lg:font-medium dark:text-gray-200'>
+ {t('onboarding.installTracking.title')}
+ </h1>
+ <p className='mt-6 max-w-prose text-base whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ <Trans
+ t={t}
+ i18nKey='onboarding.installTracking.desc'
+ components={{
+ url: (
+ <a
+ href={INTEGRATIONS_URL}
+ target='_blank'
+ rel='noopener noreferrer'
+ className='font-medium text-indigo-600 hover:underline dark:text-indigo-400'
+ />
+ ),
+ }}
+ />
+ </p>
+
+ <div className='mt-8 rounded-lg border border-gray-300 bg-white p-4 dark:border-slate-800/60 dark:bg-slate-800/25'>
+ <div className='flex items-center space-x-3'>
+ <div className='flex h-10 w-10 items-center justify-center rounded-lg bg-slate-200 dark:bg-slate-800'>
+ <LaptopMinimalIcon className='h-5 w-5 text-gray-900 dark:text-gray-100' />
+ </div>
+ <div>
+ <h3 className='font-medium text-gray-900 dark:text-gray-50'>
+ {t('onboarding.installTracking.websiteInstallation')}
+ </h3>
+ <p className='text-sm text-gray-500 dark:text-gray-400'>
+ {t('onboarding.installTracking.pasteScript')}
+ </p>
+ </div>
+ </div>
+
+ <p className='mt-4 text-gray-800 dark:text-gray-200'>
+ <Trans
+ t={t}
+ i18nKey='modals.trackingSnippet.add'
+ components={{
+ bsect: <Badge label='<body>' colour='slate' />,
+ }}
+ />
+ </p>
+
+ <Textarea
+ classes={{
+ container: 'mt-2 font-mono',
+ textarea: 'bg-gray-100 ring-0',
+ }}
+ value={getSnippet(project.id)}
+ rows={15}
+ readOnly
+ />
+
+ <p className='mt-4 text-sm text-gray-600 dark:text-gray-400'>
+ <Trans
+ t={t}
+ i18nKey='onboarding.installTracking.weAlsoSupport'
+ components={{
+ url: (
+ <a
+ href={DOCS_URL}
+ target='_blank'
+ rel='noopener noreferrer'
+ className='font-medium text-indigo-600 hover:underline dark:text-indigo-400'
+ />
+ ),
+ }}
+ />
+ </p>
+ </div>
+
+ <div className='mt-6 flex justify-end'>
+ <Button
+ onClick={async () => {
+ await updateUserStep('waiting_for_events')
+ setCurrentStep(3)
+ setIsWaitingForEvents(true)
+ }}
+ primary
+ large
+ >
+ {t('common.continue')}
+ </Button>
+ </div>
+ </div>
+ ) : null}
+
+ {/* "Verify installation" step */}
+ {currentStep === 3 ? (
+ <div>
+ <h1 className='max-w-3xl text-5xl/10 tracking-tight text-pretty text-gray-950 max-lg:font-medium dark:text-gray-200'>
+ {t('onboarding.verifyInstallation.navTitle')}
+ </h1>
+ <p className='mt-6 max-w-prose text-base whitespace-pre-line text-gray-800 dark:text-gray-200'>
+ {t('onboarding.verifyInstallation.desc')}
+ </p>
+
+ <div className='mt-8 rounded-lg border border-gray-300 bg-white p-4 dark:border-slate-800/60 dark:bg-slate-800/25'>
+ {hasEvents ? (
+ <>
+ <div className='flex items-center space-x-3'>
+ <div className='flex h-10 w-10 items-center justify-center rounded-lg bg-green-100 dark:bg-green-800/30'>
+ <CheckCircleIconSolid className='h-5 w-5 text-green-500' />
+ </div>
+ <div>
+ <h3 className='font-medium text-gray-900 dark:text-gray-50'>
+ {t('onboarding.verifyInstallation.perfect')}
+ </h3>
+ <p className='text-sm text-gray-500 dark:text-gray-400'>
+ {t('onboarding.verifyInstallation.perfectDesc')}
+ </p>
+ </div>
+ </div>
+
+ <p className='mt-4 text-gray-800 dark:text-gray-200'>
+ {t('onboarding.verifyInstallation.eventReceived')}
+ </p>
+ </>
+ ) : (
+ <>
+ <div className='flex items-center space-x-3'>
+ <div className='flex h-10 w-10 items-center justify-center rounded-lg bg-slate-200 dark:bg-slate-800'>
+ <PulsatingCircle type='big' />
+ </div>
+ <div>
+ <h3 className='font-medium text-gray-900 dark:text-gray-50'>
+ {t('onboarding.verifyInstallation.waitingForEvents')}
+ </h3>
+ <p className='text-sm text-gray-500 dark:text-gray-400'>
+ {project?.name
+ ? t('onboarding.verifyInstallation.onTheXProject', { project: project.name })
+ : t('onboarding.verifyInstallation.onYourProject')}
+ </p>
+ </div>
+ </div>
+ <p className='mt-4 text-gray-800 dark:text-gray-200'>
+ {t('onboarding.verifyInstallation.waitingForAnEvent')}
+ </p>
+
+ <p className='mt-4 text-sm text-gray-600 dark:text-gray-400'>
+ <Trans
+ t={t}
+ i18nKey='onboarding.verifyInstallation.needInstructionsAgain'
+ components={{
+ btn: (
+ <button
+ type='button'
+ onClick={() => {}}
+ className='font-medium text-indigo-600 hover:underline dark:text-indigo-400'
+ />
+ ),
+ }}
+ />
+ </p>
+ <p className='mt-2 text-sm text-gray-600 dark:text-gray-400'>
+ <Trans
+ t={t}
+ i18nKey='onboarding.verifyInstallation.orContactUs'
+ components={{
+ url: (
+ <Link
+ to={routes.contact}
+ className='font-medium text-indigo-600 hover:underline dark:text-indigo-400'
+ />
+ ),
+ }}
+ />
+ </p>
+ </>
+ )}
+ </div>
+
+ <div className='mt-6 flex justify-end gap-3'>
+ <Button
+ onClick={async () => {
+ await updateUserStep('setup_tracking')
+ setCurrentStep(2)
+ setIsWaitingForEvents(false)
+ }}
+ secondary
+ large
+ >
+ {t('common.goBack')}
+ </Button>
+ <Button onClick={handleCompleteOnboarding} primary large>
+ {t('onboarding.finishOnboarding')}
+ </Button>
+ </div>
+ </div>
+ ) : null}
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
+
+export default withAuthentication(Onboarding, auth.authenticated)
diff --git a/web/app/pages/Onboarding/index.tsx b/web/app/pages/Onboarding/index.tsx
new file mode 100644
index 000000000..c26d51492
--- /dev/null
+++ b/web/app/pages/Onboarding/index.tsx
@@ -0,0 +1 @@
+export { default } from './Onboarding'
\ No newline at end of file
diff --git a/web/app/pages/Project/New/index.tsx b/web/app/pages/Project/New/index.tsx
index e041f5787..5ea8dc80a 100644
--- a/web/app/pages/Project/New/index.tsx
+++ b/web/app/pages/Project/New/index.tsx
@@ -18,7 +18,7 @@ import Select from '~/ui/Select'
import { trackCustom } from '~/utils/analytics'
import routes from '~/utils/routes'
-const MAX_NAME_LENGTH = 50
+export const MAX_PROJECT_NAME_LENGTH = 50
const DEFAULT_PROJECT_NAME = 'Untitled Project'
@@ -70,7 +70,9 @@ const NewProject = () => {
name: data.name || DEFAULT_PROJECT_NAME,
organisationId: data.organisationId,
})
- trackCustom('PROJECT_CREATED')
+ trackCustom('PROJECT_CREATED', {
+ from: 'new-project',
+ })
navigate(routes.dashboard)
toast.success(t('project.settings.created'))
} catch (reason: any) {
@@ -90,8 +92,8 @@ const NewProject = () => {
allErrors.name = t('project.settings.noNameError')
}
- if (_size(form.name) > MAX_NAME_LENGTH) {
- allErrors.name = t('project.settings.pxCharsError', { amount: MAX_NAME_LENGTH })
+ if (_size(form.name) > MAX_PROJECT_NAME_LENGTH) {
+ allErrors.name = t('project.settings.pxCharsError', { amount: MAX_PROJECT_NAME_LENGTH })
}
const valid = _isEmpty(_keys(allErrors))
@@ -144,7 +146,7 @@ const NewProject = () => {
name='name'
label={t('project.settings.name')}
value={form.name}
- placeholder='My awesome project'
+ placeholder='My awesome website'
className='mt-4'
onChange={handleInput}
error={beenSubmitted ? errors.name : null}
diff --git a/web/app/pages/UserSettings/UserSettings.tsx b/web/app/pages/UserSettings/UserSettings.tsx
index 835906399..9a6f7fbc5 100644
--- a/web/app/pages/UserSettings/UserSettings.tsx
+++ b/web/app/pages/UserSettings/UserSettings.tsx
@@ -931,7 +931,9 @@ const UserSettings = () => {
<>
{t('profileSettings.deactivateConfirmation')}
<Textarea
- className='mt-4'
+ classes={{
+ container: 'mt-4',
+ }}
placeholder={t('profileSettings.deletionFeedback')}
onChange={(e) => setDeletionFeedback(e.target.value)}
value={deletionFeedback}
diff --git a/web/app/routes/confirm-email.tsx b/web/app/routes/confirm-email.tsx
deleted file mode 100644
index 7a2dea9ae..000000000
--- a/web/app/routes/confirm-email.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { HeadersFunction } from 'react-router'
-import { redirect } from 'react-router'
-import type { SitemapFunction } from 'remix-sitemap'
-
-import { isSelfhosted } from '~/lib/constants'
-import CheckYourInbox from '~/pages/Auth/CheckYourInbox'
-
-export const headers: HeadersFunction = ({ parentHeaders }) => {
- parentHeaders.set('X-Frame-Options', 'DENY')
- return parentHeaders
-}
-
-export const sitemap: SitemapFunction = () => ({
- exclude: true,
-})
-
-export async function loader() {
- if (isSelfhosted) {
- return redirect('/login', 302)
- }
-
- return null
-}
-
-export default function Index() {
- return <CheckYourInbox />
-}
diff --git a/web/app/routes/onboarding.tsx b/web/app/routes/onboarding.tsx
new file mode 100644
index 000000000..8d9b128a5
--- /dev/null
+++ b/web/app/routes/onboarding.tsx
@@ -0,0 +1,14 @@
+import type { MetaFunction } from 'react-router'
+
+import Onboarding from '~/pages/Onboarding'
+
+export const meta: MetaFunction = () => {
+ return [
+ { title: 'Onboarding - Swetrix' },
+ { name: 'description', content: 'Get started with Swetrix analytics in just a few steps.' },
+ ]
+}
+
+export default function OnboardingRoute() {
+ return <Onboarding />
+}
\ No newline at end of file
diff --git a/web/app/ui/Textarea.tsx b/web/app/ui/Textarea.tsx
index 11e63dd36..1e4af6092 100644
--- a/web/app/ui/Textarea.tsx
+++ b/web/app/ui/Textarea.tsx
@@ -1,15 +1,19 @@
import { Description, Field, Label, Textarea as HeadlessTextarea } from '@headlessui/react'
-import cx from 'clsx'
import _isEmpty from 'lodash/isEmpty'
import React, { memo } from 'react'
+import { cn } from '~/utils/generic'
+
interface TextareaProps {
value: string | number
label?: string
hint?: string
placeholder?: string
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void
- className?: string
+ classes?: {
+ container?: string
+ textarea?: string
+ }
error?: string | boolean
name?: string
disabled?: boolean
@@ -22,29 +26,30 @@ const Textarea = ({
hint,
placeholder,
name,
- className,
onChange,
error,
value,
disabled,
readOnly,
rows = 4,
+ classes,
}: TextareaProps) => {
const isError = !_isEmpty(error)
return (
- <Field as='div' className={className}>
+ <Field as='div' className={classes?.container}>
{label ? <Label className='flex text-sm font-medium text-gray-900 dark:text-gray-200'>{label}</Label> : null}
<HeadlessTextarea
rows={rows}
name={name}
- className={cx(
+ className={cn(
'w-full rounded-md border-0 ring-1 focus:ring-indigo-500 sm:text-sm dark:bg-slate-800 dark:text-gray-50 dark:placeholder-gray-400',
{
'text-red-900 placeholder-red-300 ring-red-600': isError,
'ring-gray-300 dark:ring-slate-800/50': !isError,
'cursor-text': disabled,
},
+ classes?.textarea,
)}
value={value}
onChange={onChange}
@@ -61,4 +66,4 @@ const Textarea = ({
)
}
-export default memo(Textarea)
+export default memo(Textarea) as typeof Textarea
diff --git a/web/app/utils/routes.ts b/web/app/utils/routes.ts
index 38e5e5735..ea4d6cb5b 100644
--- a/web/app/utils/routes.ts
+++ b/web/app/utils/routes.ts
@@ -3,7 +3,7 @@ const routes = Object.freeze({
signup: '/signup',
performance: '/performance',
errorTracking: '/error-tracking',
- confirm_email: '/confirm-email',
+ onboarding: '/onboarding',
reset_password: '/recovery',
new_password_form: '/password-reset/:id',
confirm_share: '/share/:id',
diff --git a/web/app/utils/server.ts b/web/app/utils/server.ts
index ad0409e4a..17b744737 100644
--- a/web/app/utils/server.ts
+++ b/web/app/utils/server.ts
@@ -92,12 +92,6 @@ export const getPageMeta = (t: typeof i18next.t, url?: string, _pathname?: strin
}
break
- case routes.confirm_email:
- result = {
- title: t('titles.confirm'),
- }
- break
-
case routes.confirm_share:
case routes.confirm_subcription:
case routes.transfer_confirm:
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index f2dea1e1c..6a7789f67 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -467,14 +467,9 @@
"noCC": "No credit card required.",
"alreadyAMember": "Already a member? <url>Sign in</url>"
},
- "confirm": {
- "title": "Check your inbox",
- "linkSent": "We've sent an account confirmation link to {{email}}, please click the link to confirm your email address.",
- "spam": "Can't see the email? Please check your spam folder.",
- "wrongEmail": "Wrong email? <url>Create a new account.</url>"
- },
"verification": {
- "success": "Your email has been successfully verified!"
+ "success": "Your email has been successfully verified!",
+ "continueToOnboarding": "Continue to onboarding"
},
"socialisation": {
"authSuccess": "Authentication successful",
@@ -1282,6 +1277,49 @@
"live": "You can see our live metrics on our <livedemo>public dashboard</livedemo>. You can also make your own Swetrix Dashboards public and adjust them to your needs."
}
},
+ "onboarding": {
+ "welcome": "Welcome to Swetrix",
+ "title": "Get started",
+ "skipOnboarding": "Skip onboarding",
+ "finishOnboarding": "Finish onboarding",
+ "confirm": {
+ "navTitle": "Confirm your email",
+ "navDesc": "Check your inbox and click the confirmation link.",
+ "title": "Check your inbox",
+ "linkSent": "We've sent an account confirmation link to {{email}}, please click the link to confirm your email address.",
+ "spam": "Can't see the email? Please check your spam folder.",
+ "wrongEmail": "Wrong email? <url>Create a new account.</url>"
+ },
+ "createProject": {
+ "navTitle": "Create a project",
+ "navDesc": "Add a website to start tracking analytics.",
+ "title": "Let's set up your first project",
+ "desc": "We'll help you get started with Swetrix by creating your first project. You will be able to set up your project more thoroughly after you have created it."
+ },
+ "installTracking": {
+ "navTitle": "Install tracking script",
+ "navDesc": "Add the Swetrix script to your website.",
+ "title": "Set up Swetrix on your website",
+ "desc": "Add the Swetrix script to your website. You can also use Swetrix for tracking events on your mobile or desktop apps, send events directly to our API. Learn more about more advanced integrations in our <url>documentation</url>.",
+ "websiteInstallation": "Website installation",
+ "pasteScript": "Paste the script to your website",
+ "weAlsoSupport": "We also support intalling Swetrix via NPM (for React, Vue, etc.), provide Events API to send events directly to our API, and many different integrations with other services like WordPress or Google Tag Manager. <url>Learn more</url>."
+ },
+ "verifyInstallation": {
+ "navTitle": "Verify installation",
+ "navDesc": "We're waiting for your first event to arrive.",
+ "desc": "Deploy your changes, and try visiting your website to send the first event.",
+ "needInstructionsAgain": "Need to see the instructions again? <btn>Click here</btn>",
+ "orContactUs": "Or <url>contact us</url> for further help with your setup.",
+ "waitingForEvents": "Waiting for events",
+ "onTheXProject": "On the {{project}} project",
+ "onYourProject": "On your project",
+ "perfect": "Perfect!",
+ "perfectDesc": "We're receiving data 🎉",
+ "waitingForAnEvent": "We're waiting for your first event! If your integration is set up correctly, you should see it within 1 minute.",
+ "eventReceived": "We've received your first event! Your integration works correctly. Welcome to Swetrix :)"
+ }
+ },
"titles": {
"recovery": "Account recovery",
"signin": "Sign in",
@@ -1299,7 +1337,6 @@
"socialisation": "Socialisation",
"open": "Open startup",
"passwordProtected": "This project is password protected",
- "confirm": "Check your inbox",
"performance": "End user performance monitoring to deliver fast websites",
"errors": "End user error tracking tool to deliver bug-free experiences",
"forMarketers": "For marketers",