Refactor analytics queries to use 'events' table instead of 'pageviews'

- Updated multiple analytics functions to replace references from 'pageviews' to 'events' for consistency in data tracking.
- Adjusted SQL queries across various files including getEvents, getFunnel, getLiveSessionLocations, and others to ensure accurate event data retrieval.
- Enhanced the deleteSite function to remove events associated with a site, improving data management.
This commit is contained in:
Bill Yang 2025-04-17 22:27:03 -07:00
parent b234a72f06
commit 009c04cee1
19 changed files with 36 additions and 35 deletions

View file

@ -116,7 +116,7 @@ class PageviewQueue {
// Bulk insert into database
try {
await clickhouse.insert({
table: "pageviews",
table: "events",
values: processedPageviews,
format: "JSONEachRow",
});