Commit Graph
85 Commits
Author SHA1 Message Date
Francis Cao 311190f44a getWebsiteEvent optimizations 2026-08-05 09:24:00 -07:00
Francis Cao 8a438e10ae use pivot table for hasData column. 2026-08-03 17:40:00 -07:00
Francis Cao 079cfdde84 Improve website events query performance and fix activity search persistence 2026-08-03 16:30:19 -07:00
Francis Cao b6b500ea4f fix 500 websiteEvent 2026-08-03 16:02:22 -07:00
Francis Cao d08acc9853 performance/UI fixes for events pages. 2026-08-03 15:48:48 -07:00
Federico D'Eredità 92e9b276d2 fix(queries): count custom events correctly on the hourly rollup, trying to address greptile findings
`website_event_stats_hourly` sets `views` to
`sumIf(1, event_type NOT IN (2, 5))`, so `views` is 0 on custom event
rows and the `events_count` join was summing zeroes. Switched it to
`sum(length(event_name))`, which is how `getWebsiteSessionStats`
already counts custom events on that table.

Also dropped the `getEventExpandedMetrics` change from the previous
commit. That report is filtered to custom events, so every visit it
lists has already fired at least one, and its `bounces` column counts
visits where the event fired exactly once rather than visits with a
single pageview. The threshold rule does not apply there, so the query
is left untouched.
2026-07-26 18:49:59 +02:00
Federico D'Eredità cb035fdc1a feat(queries): add BOUNCE_THRESHOLD and enhance bounce calculation logic
Updated bounce calculations to account for visits with custom events
(`EVENT_TYPE.customEvent`). A visit counts as a bounce only when its
custom event count is below `BOUNCE_THRESHOLD`, so engaged single
pageview visits are no longer misreported.

Since #3614 was opened v3 moved `getInsights` into `getBreakdown` and
copied the old formula into the channel, pageview and session
breakdowns, so those are updated too.
2026-07-26 18:49:59 +02:00
Federico D'Eredità 19fcde2c9c refactor(queries): replace hardcoded event types with constants
Replaced hardcoded `event_type` values with named constants from
`EVENT_TYPE`, as in #3614. Added the `BOUNCE_THRESHOLD` constant and
documented it in `docker-compose.yml`.
2026-07-26 18:49:58 +02:00
Francis Cao d05d9c4f34 Session and event property filtering. Closes #2945. Closes #4008. 2026-07-23 11:50:35 -07:00
Francis Cao 952143ba5e match order by with clickhouse queries 2026-07-02 10:32:43 -07:00
PeterUstinox 7b2a235741 fix(events): add GROUP BY to getEventDataEvents no-event relational branch
The no-event branch selects event_name, data_key and data_type alongside
count(*) without a GROUP BY, which throws on PostgreSQL (42803) and on MySQL
with ONLY_FULL_GROUP_BY. The event-filtered branch and both ClickHouse
branches already group correctly. Fixes #4359.
2026-06-28 23:38:00 +02:00
Francis Cao 129681ebd7 fix: harden analytics writes and hide internal server errors from client 2026-06-22 22:07:07 -07:00
Mike Cao 306ca4a435 Lint format files. Updated rng function. 2026-06-02 22:35:07 -07:00
Francis Cao 3230f6596f add more truncation fields on save 2026-05-16 17:44:53 -07:00
Francis Cao 17e7a4a63a exclude performance events from non-performance metrics/lists 2026-05-07 14:17:03 -07:00
Francis Cao fbac7518fc Add MAX_PAGING_RESULTS on hooks for performance improvements. 2026-05-04 15:43:05 -07:00
Francis Cao 946a969df6 fix syntax error 2026-05-01 13:25:54 -07:00
Francis CaoandCopilot 00c0273500 fix clickhouse filtering on event_name
Co-authored-by: Copilot <copilot@github.com>
2026-05-01 13:16:30 -07:00
Francis Cao 1f2bd7cad9 fix property filter css. format date columns in pivot table 2026-05-01 10:00:30 -07:00
Francis Cao 680a1ca1a2 refactor Property components to be resused for both session/event data. Implement session-data screens + filtering. Remove all event-data specific compoenents/queries 2026-04-29 13:11:03 -07:00
Francis Cao 9da332c489 Add Property filters for booleans, dates, arrays 2026-04-27 13:31:47 -07:00
Francis Cao 5a1ef5e674 add event-data support and charts for arrays, booleans, dates 2026-04-24 15:04:59 -07:00
Francis Cao 77dda7268e add event-data property filtering 2026-04-24 11:39:40 -07:00
Francis Cao be6154cb68 Event data properties refactor and design 2026-04-23 11:15:59 -07:00
Francis Cao aea373ca56 fix EventDataValues query 2026-03-23 16:22:06 -07:00
Francis Cao 843f104c15 update event-data to paged query 2026-03-11 10:36:50 -07:00
Francis Cao f6a6d2cc31 performance updates checkpoint 2026-03-05 10:12:30 -08:00
Francis Cao 5e68661c5d session replay updates. add clickhouse implementation, filters, tables 2026-03-03 12:47:27 -08:00
Francis Cao ddddd5e6bc add event-data GET route 2026-03-02 13:21:14 -08:00
Francis Cao 530c21dac0 add limit 50 to event chart, metrics table, and UTM report 2026-02-17 21:55:35 -08:00
Francis Cao a1a092dc19 Add MetricsBar to Events page. Closes #3830 2026-01-26 17:08:34 -08:00
Francis Cao 7bb30443a8 Add distinct ID to filters/expanded metrics. Closes #3861 2026-01-26 11:05:20 -08:00
Francis Cao 3f173889ea Fix "name" alias for relational query to be compatible with Postgres 12. Closes #3970 2026-01-22 22:04:11 -08:00
Francis Cao cd6a28ea4a improve revenue joins and event_data joins to website_event 2026-01-19 12:46:21 -08:00
Mike Cao fa8d8055df Reformatted files with biome. 2025-11-22 22:42:42 -08:00
Francis Cao f3e246c64b fix hasdata queries, add hasData to website events, fix sessionactivity truncation, 2025-11-09 23:58:20 -08:00
Francis Cao c81b1c16c8 fix geteventdatavalues query 2025-10-29 10:10:46 -07:00
Francis Cao 2ffde37f5b v3 prisma queries update 2025-10-27 11:48:35 -07:00
Francis Cao 61b667c587 update psql expanded metrics queries 2025-10-24 10:38:35 -07:00
Francis Cao 2e1a5b444a revenue, events, and session activity optimization 2025-10-21 21:12:22 -07:00
Francis Cao f23d5694ec clean up events/event-data endpoints 2025-10-15 16:44:14 -07:00
Francis Cao a2b1089e62 clean-up event/event-data endpoints. fix for expanded view for mobile 2025-10-15 11:32:19 -07:00
Francis Cao ba45972bd3 fix filter passthrough into event-data endpoints 2025-10-14 11:22:21 -07:00
Francis Cao cc3710880c optimize getWebsiteEvent hasData 2025-10-06 22:50:49 -07:00
Mike Cao 1def80ba42 Merge remote-tracking branch 'origin/dev' into dev 2025-10-02 16:57:23 -07:00
Mike Cao da572864ac Added more function names to queries. 2025-10-02 16:56:56 -07:00
Francis Cao 1809959b99 fix event type queries for pixels/links. remove hardcoded event types 2025-10-01 12:29:31 -07:00
Mike Cao 8a977b0164 Updated pixel/link endpoints. Added name to rawQuery. 2025-09-30 16:11:21 -07:00
Mike Cao 56af91950a Updated components build. 2025-09-01 15:59:06 -07:00
Mike Cao 08f9adaddf Updated expanded view. Some style fixes. 2025-08-23 03:05:21 -07:00