📈 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
Journeys bug fixes
Blue Mouseceb233f8443e
diff --git a/backend/apps/cloud/src/analytics/analytics.service.ts b/backend/apps/cloud/src/analytics/analytics.service.tsindex 69650fde1..08cde15b7 100644--- a/backend/apps/cloud/src/analytics/analytics.service.ts+++ b/backend/apps/cloud/src/analytics/analytics.service.ts@@ -1218,8 +1218,8 @@ export class AnalyticsService {continuedPast,sum(value) OVER () AS totalSessions,count() OVER () AS totalPaths,- row_number() OVER (ORDER BY value DESC) AS overallRank,- row_number() OVER (PARTITION BY length(path) ORDER BY value DESC) AS depthRank+ row_number() OVER (ORDER BY value DESC, path ASC) AS overallRank,+ row_number() OVER (PARTITION BY length(path) ORDER BY value DESC, path ASC) AS depthRankFROM (SELECTpath,@@ -1354,8 +1354,8 @@ export class AnalyticsService {SELECTpath,count() AS value,- row_number() OVER (ORDER BY value DESC) AS overallRank,- row_number() OVER (PARTITION BY length(path) ORDER BY value DESC) AS depthRank+ row_number() OVER (ORDER BY value DESC, path ASC) AS overallRank,+ row_number() OVER (PARTITION BY length(path) ORDER BY value DESC, path ASC) AS depthRankFROM session_pathsGROUP BY path)diff --git a/backend/apps/cloud/src/analytics/v2/analytics-v2.service.ts b/backend/apps/cloud/src/analytics/v2/analytics-v2.service.tsindex 690913207..7da1e041e 100644--- a/backend/apps/cloud/src/analytics/v2/analytics-v2.service.ts+++ b/backend/apps/cloud/src/analytics/v2/analytics-v2.service.ts@@ -1712,7 +1712,7 @@ export class AnalyticsV2Service {filters.filtersQuery,)} catch (reason) {- this.logger.log(+ this.logger.error(reason,'AnalyticsV2Service -> getFunnelTimeToConvert',)diff --git a/backend/apps/community/src/analytics/analytics.service.ts b/backend/apps/community/src/analytics/analytics.service.tsindex a1b2fdc8e..c00dd5dfc 100644--- a/backend/apps/community/src/analytics/analytics.service.ts+++ b/backend/apps/community/src/analytics/analytics.service.ts@@ -1021,8 +1021,8 @@ export class AnalyticsService {continuedPast,sum(value) OVER () AS totalSessions,count() OVER () AS totalPaths,- row_number() OVER (ORDER BY value DESC) AS overallRank,- row_number() OVER (PARTITION BY length(path) ORDER BY value DESC) AS depthRank+ row_number() OVER (ORDER BY value DESC, path ASC) AS overallRank,+ row_number() OVER (PARTITION BY length(path) ORDER BY value DESC, path ASC) AS depthRankFROM (SELECTpath,@@ -1157,8 +1157,8 @@ export class AnalyticsService {SELECTpath,count() AS value,- row_number() OVER (ORDER BY value DESC) AS overallRank,- row_number() OVER (PARTITION BY length(path) ORDER BY value DESC) AS depthRank+ row_number() OVER (ORDER BY value DESC, path ASC) AS overallRank,+ row_number() OVER (PARTITION BY length(path) ORDER BY value DESC, path ASC) AS depthRankFROM session_pathsGROUP BY path)diff --git a/web/app/pages/Project/tabs/Journeys/JourneysView.tsx b/web/app/pages/Project/tabs/Journeys/JourneysView.tsxindex 57f76e283..e2a507753 100644--- a/web/app/pages/Project/tabs/Journeys/JourneysView.tsx+++ b/web/app/pages/Project/tabs/Journeys/JourneysView.tsx@@ -306,6 +306,26 @@ const JourneysView = ({ tnMapping }: JourneysViewProps) => {setSearchParams(next, { replace: true, preventScrollReset: true })}+ // the URL can change without remounting the component (back/forward+ // navigation, shared links), so the controls have to follow it+ useEffect(() => {+ const stepsValue = Number(searchParams.get('steps'))+ setSteps(+ Number.isFinite(stepsValue) && stepsValue+ ? clampSteps(stepsValue)+ : DEFAULT_STEPS,+ )++ const journeysValue = Number(searchParams.get('journeys'))+ setJourneysCount(+ Number.isFinite(journeysValue) && journeysValue+ ? clampJourneys(journeysValue)+ : DEFAULT_JOURNEYS,+ )++ setView(searchParams.get('view') === 'table' ? 'table' : 'chart')+ }, [searchParams])+useEffect(() => {const timer = setTimeout(() => {setDebouncedParams({ steps, journeys: journeysCount })@@ -701,11 +721,6 @@ const JourneysView = ({ tnMapping }: JourneysViewProps) => {}if (node.kind === 'other') {- const hiddenPaths = Math.max(- (coverage?.totalPaths || 0) - (coverage?.drawnPaths || 0),- 0,- )-return (<div className={tooltipContainerClassName}><div className='flex items-center justify-between gap-6'>@@ -721,9 +736,6 @@ const JourneysView = ({ tnMapping }: JourneysViewProps) => {{node.sessions.toLocaleString()}</span></div>- <p className={`mt-1 ${tooltipLabelClassName}`}>- {t('project.journeys.hiddenPathsCount', { count: hiddenPaths })}- </p>{node.continuedPast > 0 ? (<div className={tooltipRowClassName}><span className={tooltipLabelClassName}>diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex db2614c5b..143d43505 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -2702,8 +2702,6 @@"continuedThisWay": "Continued this way","exitedHere": "Exited here","continuedFurther": "Continued further",- "hiddenPathsCount_one": "Sessions on {{count}} less common path, not drawn separately",- "hiddenPathsCount_other": "Sessions on {{count}} less common paths, not drawn separately","coverage": "Showing {{paths}} of {{totalPaths}} paths, covering {{covered}} of {{total}} multi-page sessions ({{percent}}%)","viewToggle": "Journeys view","chartView": "Chart view",