Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Merge branch 'dev' of https://github.com/umami-software/umami into feat/clickhouse-mv
Francis Cao77fcdc06462d
diff --cc scripts/start-env.jsindex e9fe2a4b4,a2f2b43fc..264c4e92b--- a/scripts/start-env.js+++ b/scripts/start-env.js@@@ -2,7 -2,6 +2,6 @@@ require('dotenv').config()const cli = require('next/dist/cli/next-start');cli.nextStart({- '--port': process.env.PORT || 3000,- '--hostname': process.env.HOSTNAME || '0.0.0.0',- _: [],- 'port': process.env.PORT || 3000,- 'hostname': process.env.HOSTNAME || '0.0.0.0'++ port: process.env.PORT || 3000,++ hostname: process.env.HOSTNAME || '0.0.0.0',});diff --cc src/queries/analytics/events/getEventMetrics.tsindex d8818bbab,8efbf7694..c97c11ad2--- a/src/queries/analytics/events/getEventMetrics.ts+++ b/src/queries/analytics/events/getEventMetrics.ts@@@ -57,17 -55,13 +57,17 @@@ async function clickhouseQuery`selectevent_name x,- ${getDateQuery('created_at', unit, timezone)} t,+ ${getDateSQL('created_at', unit, timezone)} t,count(*) y- from website_event- where website_id = {websiteId:UUID}- and created_at between {startDate:DateTime64} and {endDate:DateTime64}- and event_type = {eventType:UInt32}+ from (+ select arrayJoin(event_name) as event_name,+ created_at+ from ${table} website_event+ where website_id = {websiteId:UUID}+ and created_at between {startDate:DateTime64} and {endDate:DateTime64}+ and event_type = {eventType:UInt32}${filterQuery}+ ) as ggroup by x, torder by t`,diff --cc src/queries/analytics/pageviews/getPageviewStats.tsindex 57292f658,65bc8625f..0bb16ca9b--- a/src/queries/analytics/pageviews/getPageviewStats.ts+++ b/src/queries/analytics/pageviews/getPageviewStats.ts@@@ -55,9 -54,9 +55,9 @@@ async function clickhouseQueryg.y as yfrom (select- ${getDateQuery('created_at', unit, timezone)} as t,+ ${getDateSQL('created_at', unit, timezone)} as t,- count(*) as y- from website_event+ sum(views) as y+ from ${table} website_eventwhere website_id = {websiteId:UUID}and created_at between {startDate:DateTime64} and {endDate:DateTime64}and event_type = {eventType:UInt32}diff --cc src/queries/analytics/sessions/getSessionStats.tsindex 6db03c46f,54c46c355..2b57b922b--- a/src/queries/analytics/sessions/getSessionStats.ts+++ b/src/queries/analytics/sessions/getSessionStats.ts@@@ -55,9 -54,9 +55,9 @@@ async function clickhouseQueryg.y as yfrom (select- ${getDateQuery('created_at', unit, timezone)} as t,+ ${getDateSQL('created_at', unit, timezone)} as t,- count(distinct session_id) as y- from website_event+ uniq(session_id) as y+ from ${table} website_eventwhere website_id = {websiteId:UUID}and created_at between {startDate:DateTime64} and {endDate:DateTime64}and event_type = {eventType:UInt32}