Skip to content

📈 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!

fixed today / yesterday period for birdseye

Blue Mouse86c9c140f741
diff --git a/apps/production/src/analytics/analytics.service.ts b/apps/production/src/analytics/analytics.service.ts
index 567fda164..0117a931a 100644
--- a/apps/production/src/analytics/analytics.service.ts
+++ b/apps/production/src/analytics/analytics.service.ts
@@ -1113,13 +1113,13 @@ export class AnalyticsService {
// eslint-disable-next-line
let _to: string
- if (_isEmpty(period) || period === 'custom') {
+ if (_isEmpty(period) || ['today', 'yesterday', 'custom'].includes(period)) {
const safeTimezone = this.getSafeTimezone(timezone)
const { groupFrom, groupTo } = this.getGroupFromTo(
from,
to,
- null,
+ ['today', 'yesterday'].includes(period) ? TimeBucketType.HOUR : null,
period,
safeTimezone,
)
@@ -1268,13 +1268,13 @@ export class AnalyticsService {
// eslint-disable-next-line
let _to: string
- if (_isEmpty(period) || period === 'custom') {
+ if (_isEmpty(period) || ['today', 'yesterday', 'custom'].includes(period)) {
const safeTimezone = this.getSafeTimezone(timezone)
const { groupFrom, groupTo } = this.getGroupFromTo(
from,
to,
- null,
+ ['today', 'yesterday'].includes(period) ? TimeBucketType.HOUR : null,
period,
safeTimezone,
)
@@ -1449,13 +1449,13 @@ export class AnalyticsService {
// eslint-disable-next-line
let _to: string
- if (_isEmpty(period) || period === 'custom') {
+ if (_isEmpty(period) || ['today', 'yesterday', 'custom'].includes(period)) {
const safeTimezone = this.getSafeTimezone(timezone)
const { groupFrom, groupTo } = this.getGroupFromTo(
from,
to,
- null,
+ ['today', 'yesterday'].includes(period) ? TimeBucketType.HOUR : null,
period,
safeTimezone,
)