From 2cd1f5541bfeeb77703998ab05cc84e3546441f6 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Wed, 19 Apr 2023 09:13:16 -0700 Subject: [PATCH] add event type to getWebsiteStats --- queries/analytics/stats/getWebsiteStats.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/queries/analytics/stats/getWebsiteStats.ts b/queries/analytics/stats/getWebsiteStats.ts index 73f2bdab..8530b14e 100644 --- a/queries/analytics/stats/getWebsiteStats.ts +++ b/queries/analytics/stats/getWebsiteStats.ts @@ -41,7 +41,8 @@ async function relationalQuery( join website on website_event.website_id = website.website_id ${joinSession} - where website.website_id = $1${toUuid()} + where event_type = ${EVENT_TYPE.pageView} + and website.website_id = $1${toUuid()} and website_event.created_at >= $2 and website_event.created_at between $3 and $4 ${filterQuery}