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!

No profiles / No sessions components

Blue Mouse024758ed3d39
diff --git a/web/app/pages/Project/View/components/NoEvents.tsx b/web/app/pages/Project/View/components/NoEvents.tsx
index d6b359e89..8d6689df9 100644
--- a/web/app/pages/Project/View/components/NoEvents.tsx
+++ b/web/app/pages/Project/View/components/NoEvents.tsx
@@ -25,9 +25,9 @@ const NoEvents = ({ filters }: NoEventsProps) => {
<div className='mx-auto w-full max-w-2xl py-16 text-center'>
<div className='mx-auto mb-6 flex size-14 items-center justify-center rounded-xl bg-gray-100 dark:bg-slate-800'>
{hasFilters ? (
- <FunnelIcon className='size-7 text-gray-400 dark:text-slate-500' />
+ <FunnelIcon className='size-7 text-gray-700 dark:text-gray-200' />
) : (
- <CalendarDaysIcon className='size-7 text-gray-400 dark:text-slate-500' />
+ <CalendarDaysIcon className='size-7 text-gray-700 dark:text-gray-200' />
)}
</div>
<Text as='h3' size='xl' weight='medium' className='tracking-tight'>
diff --git a/web/app/pages/Project/tabs/Captcha/NoCaptchaEvents.tsx b/web/app/pages/Project/tabs/Captcha/NoCaptchaEvents.tsx
index cd59e2c10..6b639a62f 100644
--- a/web/app/pages/Project/tabs/Captcha/NoCaptchaEvents.tsx
+++ b/web/app/pages/Project/tabs/Captcha/NoCaptchaEvents.tsx
@@ -25,9 +25,9 @@ const NoCaptchaEvents = ({ filters }: NoCaptchaEventsProps) => {
<div className='mx-auto w-full max-w-2xl py-16 text-center'>
<div className='mx-auto mb-6 flex size-14 items-center justify-center rounded-xl bg-gray-100 dark:bg-slate-800'>
{hasFilters ? (
- <FunnelIcon className='size-7 text-gray-400 dark:text-slate-500' />
+ <FunnelIcon className='size-7 text-gray-700 dark:text-gray-200' />
) : (
- <CalendarDaysIcon className='size-7 text-gray-400 dark:text-slate-500' />
+ <CalendarDaysIcon className='size-7 text-gray-700 dark:text-gray-200' />
)}
</div>
<Text as='h3' size='xl' weight='medium' className='tracking-tight'>
diff --git a/web/app/pages/Project/tabs/Profiles/ProfilesView.tsx b/web/app/pages/Project/tabs/Profiles/ProfilesView.tsx
index bb1465fcf..ad33df521 100644
--- a/web/app/pages/Project/tabs/Profiles/ProfilesView.tsx
+++ b/web/app/pages/Project/tabs/Profiles/ProfilesView.tsx
@@ -7,10 +7,10 @@ import { useSearchParams } from 'react-router'
import { getProfiles, getProfile, getProfileSessions } from '~/api'
import { Profile, ProfileDetails as ProfileDetailsType, Session } from '~/lib/models/Project'
+import NoProfiles from '~/pages/Project/tabs/Profiles/components/NoProfiles'
import { ProfileDetails } from '~/pages/Project/tabs/Profiles/ProfileDetails'
import { Profiles, ProfilesFilter } from '~/pages/Project/tabs/Profiles/Profiles'
import DashboardHeader from '~/pages/Project/View/components/DashboardHeader'
-import NoEvents from '~/pages/Project/View/components/NoEvents'
import { useViewProjectContext } from '~/pages/Project/View/ViewProject'
import { getFormatDate } from '~/pages/Project/View/ViewProject.helpers'
import { useCurrentProject, useProjectPassword } from '~/providers/CurrentProjectProvider'
@@ -368,7 +368,7 @@ const ProfilesView = ({ tnMapping }: ProfilesViewProps) => {
) : null}
{(profilesLoading === null || profilesLoading) && _isEmpty(profiles) ? <Loader /> : null}
{typeof profilesLoading === 'boolean' && !profilesLoading && _isEmpty(profiles) ? (
- <NoEvents filters={filters} />
+ <NoProfiles filters={filters} />
) : null}
<Profiles profiles={profiles} timeFormat={timeFormat} />
{canLoadMoreProfiles ? (
diff --git a/web/app/pages/Project/tabs/Profiles/components/NoProfiles.tsx b/web/app/pages/Project/tabs/Profiles/components/NoProfiles.tsx
new file mode 100644
index 000000000..f233b0897
--- /dev/null
+++ b/web/app/pages/Project/tabs/Profiles/components/NoProfiles.tsx
@@ -0,0 +1,43 @@
+import { FunnelIcon } from '@heroicons/react/24/outline'
+import _isEmpty from 'lodash/isEmpty'
+import { UserIcon } from 'lucide-react'
+import { memo } from 'react'
+import { useTranslation } from 'react-i18next'
+
+import Filters from '~/pages/Project/View/components/Filters'
+import { Filter } from '~/pages/Project/View/interfaces/traffic'
+import { typeNameMapping } from '~/pages/Project/View/ViewProject.helpers'
+import { Text } from '~/ui/Text'
+
+interface NoProfilesProps {
+ filters: Filter[]
+}
+
+const NoProfiles = ({ filters }: NoProfilesProps) => {
+ const { t } = useTranslation('common')
+ const tnMapping = typeNameMapping(t)
+ const hasFilters = !_isEmpty(filters)
+
+ return (
+ <>
+ {hasFilters ? <Filters tnMapping={tnMapping} /> : null}
+ <div className='mx-auto w-full max-w-2xl py-16 text-center'>
+ <div className='mx-auto mb-6 flex size-14 items-center justify-center rounded-xl bg-gray-100 dark:bg-slate-800'>
+ {hasFilters ? (
+ <FunnelIcon className='size-7 text-gray-700 dark:text-gray-200' />
+ ) : (
+ <UserIcon className='size-7 text-gray-700 dark:text-gray-200' />
+ )}
+ </div>
+ <Text as='h3' size='xl' weight='medium' className='tracking-tight'>
+ {t('project.noProfilesTitle')}
+ </Text>
+ <Text as='p' size='sm' colour='secondary' className='mx-auto mt-2 max-w-md'>
+ {hasFilters ? t('project.noProfilesFiltersDesc') : t('project.noProfilesContent')}
+ </Text>
+ </div>
+ </>
+ )
+}
+
+export default memo(NoProfiles)
diff --git a/web/app/pages/Project/tabs/Sessions/SessionsView.tsx b/web/app/pages/Project/tabs/Sessions/SessionsView.tsx
index f504aee78..6e46c559a 100644
--- a/web/app/pages/Project/tabs/Sessions/SessionsView.tsx
+++ b/web/app/pages/Project/tabs/Sessions/SessionsView.tsx
@@ -7,11 +7,11 @@ import { useSearchParams } from 'react-router'
import { getSessions, getSession } from '~/api'
import { Session, SessionDetails as SessionDetailsType } from '~/lib/models/Project'
+import NoSessions from '~/pages/Project/tabs/Sessions/components/NoSessions'
import { SessionDetailView } from '~/pages/Project/tabs/Sessions/SessionDetailView'
import { Sessions } from '~/pages/Project/tabs/Sessions/Sessions'
import DashboardHeader from '~/pages/Project/View/components/DashboardHeader'
import Filters from '~/pages/Project/View/components/Filters'
-import NoEvents from '~/pages/Project/View/components/NoEvents'
import { useViewProjectContext } from '~/pages/Project/View/ViewProject'
import { getFormatDate } from '~/pages/Project/View/ViewProject.helpers'
import { useCurrentProject, useProjectPassword } from '~/providers/CurrentProjectProvider'
@@ -279,7 +279,7 @@ const SessionsView = ({ tnMapping, rotateXAxis }: SessionsViewProps) => {
{!_isEmpty(sessions) ? <Filters className='mb-3' tnMapping={tnMapping} /> : null}
{(sessionsLoading === null || sessionsLoading) && _isEmpty(sessions) ? <Loader /> : null}
{typeof sessionsLoading === 'boolean' && !sessionsLoading && _isEmpty(sessions) ? (
- <NoEvents filters={filters} />
+ <NoSessions filters={filters} />
) : null}
<Sessions sessions={sessions} timeFormat={timeFormat} currency={project?.revenueCurrency} />
{canLoadMoreSessions ? (
diff --git a/web/app/pages/Project/tabs/Sessions/components/NoSessions.tsx b/web/app/pages/Project/tabs/Sessions/components/NoSessions.tsx
new file mode 100644
index 000000000..54bca7a8a
--- /dev/null
+++ b/web/app/pages/Project/tabs/Sessions/components/NoSessions.tsx
@@ -0,0 +1,42 @@
+import { FunnelIcon, ClockIcon } from '@heroicons/react/24/outline'
+import _isEmpty from 'lodash/isEmpty'
+import { memo } from 'react'
+import { useTranslation } from 'react-i18next'
+
+import Filters from '~/pages/Project/View/components/Filters'
+import { Filter } from '~/pages/Project/View/interfaces/traffic'
+import { typeNameMapping } from '~/pages/Project/View/ViewProject.helpers'
+import { Text } from '~/ui/Text'
+
+interface NoSessionsProps {
+ filters: Filter[]
+}
+
+const NoSessions = ({ filters }: NoSessionsProps) => {
+ const { t } = useTranslation('common')
+ const tnMapping = typeNameMapping(t)
+ const hasFilters = !_isEmpty(filters)
+
+ return (
+ <>
+ {hasFilters ? <Filters tnMapping={tnMapping} /> : null}
+ <div className='mx-auto w-full max-w-2xl py-16 text-center'>
+ <div className='mx-auto mb-6 flex size-14 items-center justify-center rounded-xl bg-gray-100 dark:bg-slate-800'>
+ {hasFilters ? (
+ <FunnelIcon className='size-7 text-gray-700 dark:text-gray-200' />
+ ) : (
+ <ClockIcon className='size-7 text-gray-700 dark:text-gray-200' />
+ )}
+ </div>
+ <Text as='h3' size='xl' weight='medium' className='tracking-tight'>
+ {t('project.noSessionsTitle')}
+ </Text>
+ <Text as='p' size='sm' colour='secondary' className='mx-auto mt-2 max-w-md'>
+ {hasFilters ? t('project.noSessionsFiltersDesc') : t('project.noSessionsContent')}
+ </Text>
+ </div>
+ </>
+ )
+}
+
+export default memo(NoSessions)
diff --git a/web/public/locales/de.json b/web/public/locales/de.json
index f20a9316d..636187e25 100644
--- a/web/public/locales/de.json
+++ b/web/public/locales/de.json
@@ -1335,6 +1335,12 @@
"trendlineTotal": "Seitenansichten Trendlinie",
"noEvContent": "Für den angegebenen Zeitraum wurden keine Ereignisse erfasst. Bitte versuchen Sie einen anderen Zeitraum.",
"noEventsFiltersDesc": "Für den angegebenen Zeitraum oder die angewendeten Filter wurden keine Ereignisse erfasst. Bitte versuchen Sie es mit einem anderen Zeitraum oder ändern Sie die angewendeten Filter.",
+ "noProfilesTitle": "Noch keine Profile",
+ "noProfilesContent": "Für den angegebenen Zeitraum wurden keine Profile erfasst, bitte versuchen Sie einen anderen Zeitraum.",
+ "noProfilesFiltersDesc": "Für den angegebenen Zeitraum oder mit den angewendeten Filtern wurden keine Profile erfasst, bitte versuchen Sie einen anderen Zeitraum oder ändern Sie die angewendeten Filter.",
+ "noSessionsTitle": "Noch keine Sitzungen",
+ "noSessionsContent": "Für den angegebenen Zeitraum wurden keine Sitzungen erfasst, bitte versuchen Sie einen anderen Zeitraum.",
+ "noSessionsFiltersDesc": "Für den angegebenen Zeitraum oder mit den angewendeten Filtern wurden keine Sitzungen erfasst, bitte versuchen Sie einen anderen Zeitraum oder ändern Sie die angewendeten Filter.",
"noCaptchaEv": "Für den angegebenen Zeitraum wurden keine Ereignisse erfasst.\nWenn Sie CAPTCHA noch nicht eingerichtet haben, können Sie sich unsere <url>Docs</url> anschauen, um es einfach in Ihre App zu integrieren.",
"mapping": {
"cc": "Land",
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 0e21bebe4..31d1be3a7 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -1335,6 +1335,12 @@
"trendlineTotal": "Pageviews trendline",
"noEvContent": "No events have been recorded for the specified period, please try a different period.",
"noEventsFiltersDesc": "No events have been recorded for the specified period or applied filters, please try a different period or change the filters applied.",
+ "noProfilesTitle": "No profiles yet",
+ "noProfilesContent": "No profiles have been recorded for the specified period, please try a different period.",
+ "noProfilesFiltersDesc": "No profiles have been recorded for the specified period or applied filters, please try a different period or change the filters applied.",
+ "noSessionsTitle": "No sessions yet",
+ "noSessionsContent": "No sessions have been recorded for the specified period, please try a different period.",
+ "noSessionsFiltersDesc": "No sessions have been recorded for the specified period or applied filters, please try a different period or change the filters applied.",
"noCaptchaEv": "No events have been captured for the specified timeframe.\nIf you haven't set up CAPTCHA yet, you can check out our <url>Docs</url> to easily integrate it into your app.",
"mapping": {
"cc": "Country",
diff --git a/web/public/locales/fr.json b/web/public/locales/fr.json
index ec1034e0e..3c48c45a6 100644
--- a/web/public/locales/fr.json
+++ b/web/public/locales/fr.json
@@ -1335,6 +1335,12 @@
"trendlineTotal": "Tendance des pages vues",
"noEvContent": "Aucun événement n'a été capturé pour la période spécifiée.\nSi vous n'avez pas encore suivi d'événements, vous pouvez consulter notre <url>Documentation</url> pour intégrer facilement le suivi dans votre application.",
"noEventsFiltersDesc": "Aucun événement n'a été capturé pour la période spécifiée ou les filtres appliqués. Veuillez essayer une autre période ou modifier les filtres appliqués.",
+ "noProfilesTitle": "Aucun profil pour le moment",
+ "noProfilesContent": "Aucun profil n’a été enregistré pour la période spécifiée, veuillez essayer une autre période.",
+ "noProfilesFiltersDesc": "Aucun profil n’a été enregistré pour la période spécifiée ou avec les filtres appliqués, veuillez essayer une autre période ou modifier les filtres appliqués.",
+ "noSessionsTitle": "Aucune session pour le moment",
+ "noSessionsContent": "Aucune session n’a été enregistrée pour la période spécifiée, veuillez essayer une autre période.",
+ "noSessionsFiltersDesc": "Aucune session n’a été enregistrée pour la période spécifiée ou avec les filtres appliqués, veuillez essayer une autre période ou modifier les filtres appliqués.",
"noCaptchaEv": "Aucun événement n'a été capturé pour la période spécifiée.\nSi vous n'avez pas encore configuré CAPTCHA, vous pouvez consulter notre <url>Documentation</url> pour l'intégrer facilement dans votre application.",
"mapping": {
"cc": "Pays",
diff --git a/web/public/locales/pl.json b/web/public/locales/pl.json
index 7f70c605f..171a77690 100644
--- a/web/public/locales/pl.json
+++ b/web/public/locales/pl.json
@@ -1335,6 +1335,12 @@
"trendlineTotal": "Linia trendu odsłon witryny",
"noEvContent": "W wybranym okresie nie zarejestrowano żadnych zdarzeń, proszę spróbować inny okres.",
"noEventsFiltersDesc": "W wybranym okresie lub przy zastosowanych filtrach nie zarejestrowano żadnych zdarzeń, spróbuj innego okresu lub zmień zastosowane filtry.",
+ "noProfilesTitle": "Brak profili na razie",
+ "noProfilesContent": "Nie zarejestrowano żadnych profili dla wybranego okresu, spróbuj wybrać inny okres.",
+ "noProfilesFiltersDesc": "Nie zarejestrowano żadnych profili dla wybranego okresu lub zastosowanych filtrów, spróbuj wybrać inny okres lub zmień zastosowane filtry.",
+ "noSessionsTitle": "Brak sesji na razie",
+ "noSessionsContent": "Nie zarejestrowano żadnych sesji dla wybranego okresu, spróbuj wybrać inny okres.",
+ "noSessionsFiltersDesc": "Nie zarejestrowano żadnych sesji dla wybranego okresu lub zastosowanych filtrów, spróbuj wybrać inny okres lub zmień zastosowane filtry.",
"noCaptchaEv": "Nie przechwycono żadnych zdarzeń dla określonych ram czasowych.\nJeśli jeszcze nie skonfigurowałeś CAPTCHA, możesz sprawdzić nasze <url>Docs</url>, aby łatwo zintegrować go z aplikacją.",
"mapping": {
"cc": "Kraj",
diff --git a/web/public/locales/uk.json b/web/public/locales/uk.json
index 2d5acf7f6..0e6c7665b 100644
--- a/web/public/locales/uk.json
+++ b/web/public/locales/uk.json
@@ -1335,6 +1335,12 @@
"trendlineTotal": "Тренд кількості переглядів",
"noEvContent": "За вказаний період не було зафіксовано жодної події, будь ласка, спробуйте інший період.",
"noEventsFiltersDesc": "За вказаний період або застосовані фільтри події не зафіксовано, будь ласка, спробуйте інший період або змініть застосовані фільтри.",
+ "noProfilesTitle": "Профілів ще немає",
+ "noProfilesContent": "За вказаний період профілі не були зафіксовані, будь ласка, спробуйте інший період.",
+ "noProfilesFiltersDesc": "За вказаний період або за застосованими фільтрами профілі не були зафіксовані, будь ласка, спробуйте інший період або змініть застосовані фільтри.",
+ "noSessionsTitle": "Сесій ще немає",
+ "noSessionsContent": "За вказаний період сесії не були зафіксовані, будь ласка, спробуйте інший період.",
+ "noSessionsFiltersDesc": "За вказаний період або за застосованими фільтрами сесії не були зафіксовані, будь ласка, спробуйте інший період або змініть застосовані фільтри.",
"noCaptchaEv": "За вказаний період часу не було зафіксовано жодної події.\nЯкщо ви ще не інтегрували віджет CAPTCHA в ваш вебсайт, ви можете ознайомитися з <url>документацією</url>, щоб легко це зробити.",
"mapping": {
"cc": "Країна",