📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fixed avgSdur calculation
Blue Mouse211fb9f32be0
diff --git a/src/analytics/analytics.service.ts b/src/analytics/analytics.service.tsindex aeb77d881..a45c36238 100644--- a/src/analytics/analytics.service.ts+++ b/src/analytics/analytics.service.ts@@ -614,7 +614,7 @@ export class AnalyticsService {// Average session duration calculationlet avgSdur = 0if (!customEVFilterApplied) {- const avgSdurQuery = `SELECT avg(sdur) ${subQuery} AND sdur IS NOT NULL`+ const avgSdurQuery = `SELECT avg(sdur) ${subQuery} AND sdur IS NOT NULL AND unique='1'`const avgSdurObject = await clickhouse.query(avgSdurQuery, paramsData).toPromise()