📈 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
report profiles count
Blue Mouse818ebb3382eb
diff --git a/backend/apps/cloud/src/analytics/analytics.service.ts b/backend/apps/cloud/src/analytics/analytics.service.tsindex 4a7a717c4..006c678ed 100644--- a/backend/apps/cloud/src/analytics/analytics.service.ts+++ b/backend/apps/cloud/src/analytics/analytics.service.ts@@ -1717,7 +1717,8 @@ export class AnalyticsService {WITH analytics_counts AS (SELECTcount(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1765,17 +1766,20 @@ export class AnalyticsService {current: {all: data[0].all,unique: data[0].unique,+ users: data[0].users,bounceRate,sdur: data[0].sdur,},previous: {all: 0,unique: 0,+ users: 0,bounceRate: 0,sdur: 0,},change: data[0].all,uniqueChange: data[0].unique,+ usersChange: data[0].users,bounceRateChange: bounceRate,sdurChange: data[0].sdur,customEVFilterApplied,@@ -1798,7 +1802,8 @@ export class AnalyticsService {SELECT1 AS sortOrder,count(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1828,7 +1833,8 @@ export class AnalyticsService {SELECT2 AS sortOrder,count(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1913,17 +1919,20 @@ export class AnalyticsService {current: {all: currentPeriod.all,unique: currentPeriod.unique,+ users: currentPeriod.users,sdur: currentPeriod.sdur || 0,bounceRate,},previous: {all: previousPeriod.all,unique: previousPeriod.unique,+ users: previousPeriod.users,sdur: previousPeriod.sdur || 0,bounceRate: prevBounceRate,},change: currentPeriod.all - previousPeriod.all,uniqueChange: currentPeriod.unique - previousPeriod.unique,+ usersChange: currentPeriod.users - previousPeriod.users,bounceRateChange: (bounceRate - prevBounceRate) * -1,sdurChange: currentPeriod.sdur - previousPeriod.sdur,customEVFilterApplied,diff --git a/backend/apps/cloud/src/analytics/interfaces/index.ts b/backend/apps/cloud/src/analytics/interfaces/index.tsindex 496597ce1..394c15d76 100644--- a/backend/apps/cloud/src/analytics/interfaces/index.ts+++ b/backend/apps/cloud/src/analytics/interfaces/index.ts@@ -19,6 +19,7 @@ export interface TrafficCHResponse {export interface BirdseyeCHResponse {all: numberunique: number+ users: numbersdur: number}@@ -134,6 +135,7 @@ export interface IGetFunnel {interface IOverallPeriodStats {all: numberunique: number+ users: numberbounceRate: numbersdur: number}@@ -169,6 +171,7 @@ interface IOverallObject {previous: IOverallPeriodStatschange: numberuniqueChange?: number+ usersChange?: numberbounceRateChange?: numbersdurChange?: number}diff --git a/backend/apps/community/src/analytics/analytics.service.ts b/backend/apps/community/src/analytics/analytics.service.tsindex 94e4b7928..2ebcdaabb 100644--- a/backend/apps/community/src/analytics/analytics.service.ts+++ b/backend/apps/community/src/analytics/analytics.service.ts@@ -1521,7 +1521,8 @@ export class AnalyticsService {WITH analytics_counts AS (SELECTcount(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1569,17 +1570,20 @@ export class AnalyticsService {current: {all: data[0].all,unique: data[0].unique,+ users: data[0].users,bounceRate,sdur: data[0].sdur,},previous: {all: 0,unique: 0,+ users: 0,bounceRate: 0,sdur: 0,},change: data[0].all,uniqueChange: data[0].unique,+ usersChange: data[0].users,bounceRateChange: bounceRate,sdurChange: data[0].sdur,customEVFilterApplied,@@ -1602,7 +1606,8 @@ export class AnalyticsService {SELECT1 AS sortOrder,count(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1632,7 +1637,8 @@ export class AnalyticsService {SELECT2 AS sortOrder,count(*) AS all,- count(DISTINCT psid) AS unique+ count(DISTINCT psid) AS unique,+ count(DISTINCT profileId) AS usersFROM analyticsWHEREpid = {pid:FixedString(12)}@@ -1717,17 +1723,20 @@ export class AnalyticsService {current: {all: currentPeriod.all,unique: currentPeriod.unique,+ users: currentPeriod.users,sdur: currentPeriod.sdur || 0,bounceRate,},previous: {all: previousPeriod.all,unique: previousPeriod.unique,+ users: previousPeriod.users,sdur: previousPeriod.sdur || 0,bounceRate: prevBounceRate,},change: currentPeriod.all - previousPeriod.all,uniqueChange: currentPeriod.unique - previousPeriod.unique,+ usersChange: currentPeriod.users - previousPeriod.users,bounceRateChange: (bounceRate - prevBounceRate) * -1,sdurChange: currentPeriod.sdur - previousPeriod.sdur,customEVFilterApplied,diff --git a/backend/apps/community/src/analytics/interfaces/index.ts b/backend/apps/community/src/analytics/interfaces/index.tsindex 37f76ff3d..caedb95c0 100644--- a/backend/apps/community/src/analytics/interfaces/index.ts+++ b/backend/apps/community/src/analytics/interfaces/index.ts@@ -128,12 +128,14 @@ export interface IGetFunnel {export interface BirdseyeCHResponse {all: numberunique: number+ users: numbersdur: number}interface IOverallPeriodStats {all: numberunique: number+ users: numberbounceRate: numbersdur: number}@@ -159,6 +161,7 @@ interface IOverallObject {previous: IOverallPeriodStatschange: numberuniqueChange?: number+ usersChange?: numberbounceRateChange?: numbersdurChange?: number}diff --git a/web/app/lib/models/Project.ts b/web/app/lib/models/Project.tsindex b3ad508e0..ba854b01e 100644--- a/web/app/lib/models/Project.ts+++ b/web/app/lib/models/Project.ts@@ -3,6 +3,7 @@ import { Organisation, Role } from './Organisation'interface OverallPeriodStats {all: numberunique?: number+ users?: numberbounceRate?: numbersdur?: number}@@ -12,6 +13,7 @@ export interface OverallObject {previous: OverallPeriodStatschange: numberuniqueChange?: number+ usersChange?: numberbounceRateChange?: numbersdurChange?: numbercustomEVFilterApplied?: booleandiff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsxindex d5a30e155..ca9b50729 100644--- a/web/app/pages/Project/View/ViewProject.tsx+++ b/web/app/pages/Project/View/ViewProject.tsx@@ -1282,7 +1282,7 @@ const ViewProjectContent = () => {return [{id: CHART_METRICS_MAPPING.unique,- label: t('dashboard.unique'),+ label: t('dashboard.sessions'),active: activeChartMetrics[CHART_METRICS_MAPPING.unique],},{@@ -1415,7 +1415,7 @@ const ViewProjectContent = () => {const dataNames = useMemo(() => ({- unique: t('project.unique'),+ unique: t('dashboard.sessions'),total: t('project.total'),pageviews: t('project.pageviews'),customEvents: t('project.customEvents'),diff --git a/web/app/pages/Project/View/components/MetricCards.tsx b/web/app/pages/Project/View/components/MetricCards.tsxindex f9ccb2734..9c91ef232 100644--- a/web/app/pages/Project/View/components/MetricCards.tsx+++ b/web/app/pages/Project/View/components/MetricCards.tsx@@ -181,12 +181,14 @@ export const MetricCards = memo(({ overall, overallCompare, activePeriodCompareconst { t } = useTranslation('common')let uniqueChange = overall.uniqueChange+ let usersChange = overall.usersChangelet allChange = overall.changelet bounceRateChange = overall.bounceRateChangelet sdurChange = overall.sdurChangeif (!_isEmpty(overallCompare) && activePeriodCompare !== 'previous') {uniqueChange = (overall.current?.unique as number) - (overallCompare?.current?.unique as number)+ usersChange = (overall.current?.users as number) - (overallCompare?.current?.users as number)allChange = (overall.current?.all as number) - (overallCompare?.current?.all as number)bounceRateChange = ((overall.current?.bounceRate as number) - (overallCompare.current?.bounceRate as number)) * -1sdurChange = (overall.current?.sdur as number) - (overallCompare?.current?.sdur as number)@@ -208,7 +210,15 @@ export const MetricCards = memo(({ overall, overallCompare, activePeriodComparereturn (<><MetricCard- label={t('dashboard.unique')}+ label={t('dashboard.users')}+ value={overall.current?.users}+ change={usersChange}+ type='percent'+ goodChangeDirection='down'+ valueMapper={(value, type) => `${type === 'badge' && value > 0 ? '+' : ''}${nFormatter(value, 1)}`}+ />+ <MetricCard+ label={t('dashboard.sessions')}value={overall.current?.unique}change={uniqueChange}type='percent'diff --git a/web/app/routes/_index.tsx b/web/app/routes/_index.tsxindex d55128f31..291c723ce 100644--- a/web/app/routes/_index.tsx+++ b/web/app/routes/_index.tsx@@ -475,7 +475,7 @@ const AnalyticsLivePreview = () => {<div className='mb-3 flex items-center justify-between'><div className='flex gap-3'>{[- { l: t('dashboard.unique'), v: 471 },+ { l: t('dashboard.sessions'), v: 471 },{ l: t('dashboard.pageviews'), v: 994 },{ l: t('dashboard.bounceRate'), v: '28.5%' },].map((k) => (diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex 7ab257ef7..81c8dea6b 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -810,7 +810,7 @@"firstSeen": "First seen","lastSeen": "Last seen","atFile": "At {{filename}}, line {{lineno}}, column {{colno}}",- "unique": "Unique views",+ "users": "Users","createdAt": "Created at","inc": "Increased by","dec": "Descreased by",@@ -1008,7 +1008,7 @@"noSessionDetails": "No session details","noSessionDesc": "We could not find a session with the specified session ID.","showAll": "Show all views",- "trendlineUnique": "Unique visitors trendline",+ "trendlineUnique": "Sessions trendline","backToFunnels": "Back to funnels list","backToSessions": "Back to sessions list","backToUsers": "Back to users list",@@ -1125,7 +1125,6 @@"conflictMetric": "The metric you selected conflicts with an already selected one","prev": "Previous","next": "Next",- "unique": "Unique visitors","results": "Results","total": "Total page views","pageviews": "Pageviews",