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!

fix analytics query string replacements

Blue Mouse5fc892352d98
diff --git a/backend/apps/cloud/src/analytics/analytics.service.ts b/backend/apps/cloud/src/analytics/analytics.service.ts
index d38b5967c..cb2ff28a0 100644
--- a/backend/apps/cloud/src/analytics/analytics.service.ts
+++ b/backend/apps/cloud/src/analytics/analytics.service.ts
@@ -2757,11 +2757,11 @@ export class AnalyticsService {
const periodType = this.getAnalyticsEventType(customEVFilterApplied)
const currentFiltersQuery = filtersQuery
- .replaceAll('{groupFrom:String}', '{groupFromUTC:String}')
- .replaceAll('{groupTo:String}', '{groupToUTC:String}')
+ .replace(/{groupFrom:String}/g, '{groupFromUTC:String}')
+ .replace(/{groupTo:String}/g, '{groupToUTC:String}')
const previousFiltersQuery = filtersQuery
- .replaceAll('{groupFrom:String}', '{periodSubtracted:String}')
- .replaceAll('{groupTo:String}', '{groupFromUTC:String}')
+ .replace(/{groupFrom:String}/g, '{periodSubtracted:String}')
+ .replace(/{groupTo:String}/g, '{groupFromUTC:String}')
const queryCurrent = `
WITH analytics_counts AS (