Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Refactor SQL query in getSingleCol to improve pathname retrieval

Bill Yang10ac009185d4
diff --git a/server/src/api/analytics/getSingleCol.ts b/server/src/api/analytics/getSingleCol.ts
index e762b6b8b..b6b5b5211 100644
--- a/server/src/api/analytics/getSingleCol.ts
+++ b/server/src/api/analytics/getSingleCol.ts
@@ -143,7 +143,7 @@ const getQuery = (request: FastifyRequest<GetSingleColRequest>, isCountQuery: bo
TitleStatsWithSessions AS (
SELECT
e.page_title as value,
- argMax(e.pathname, e.timestamp) as pathname,
+ e.pathname as pathname,
e.session_id,
spc.pageviews_in_session
FROM events e