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!

lint:fix

Blue Mouse51e83c188509
diff --git a/apps/production/src/analytics/analytics.controller.ts b/apps/production/src/analytics/analytics.controller.ts
index 611160b3e..390a80687 100644
--- a/apps/production/src/analytics/analytics.controller.ts
+++ b/apps/production/src/analytics/analytics.controller.ts
@@ -295,8 +295,6 @@ export class AnalyticsController {
)
await this.analyticsService.checkProjectAccess(pid, uid)
- console.log('GROUP FROM TO:', { groupFrom, groupTo, groupFromUTC, groupToUTC })
-
let queryCustoms = `SELECT ev, count() FROM customEV WHERE pid = {pid:FixedString(12)} ${filtersQuery} AND created BETWEEN {groupFrom:String} AND {groupTo:String} GROUP BY ev`
let subQuery = `FROM ${
isCaptcha ? 'captcha' : 'analytics'
diff --git a/apps/production/src/analytics/analytics.service.ts b/apps/production/src/analytics/analytics.service.ts
index a96144758..608064dfd 100644
--- a/apps/production/src/analytics/analytics.service.ts
+++ b/apps/production/src/analytics/analytics.service.ts
@@ -1187,7 +1187,7 @@ export class AnalyticsService {
? 0
: await this.calculateAverageSessionDuration(subQuery, paramsData)
- const { x, xShifted } = this.generateXAxis(
+ const { xShifted } = this.generateXAxis(
timeBucket,
from,
to,
@@ -1207,9 +1207,10 @@ export class AnalyticsService {
)
const uniques =
- this.extractCustomEventsChartData(result, xShifted)?._unknown_event || []
+ this.extractCustomEventsChartData(result, xShifted)?._unknown_event ||
+ []
- const sdur = Array(_size(x)).fill(0)
+ const sdur = Array(_size(xShifted)).fill(0)
return Promise.resolve({
chart: {
@@ -1234,11 +1235,6 @@ export class AnalyticsService {
const { visits, uniques, sdur } = this.extractChartData(result, xShifted)
- console.log(x, xShifted)
-
- console.log('----------------')
- console.log(result)
-
return Promise.resolve({
chart: {
x: xShifted,
@@ -1301,7 +1297,7 @@ export class AnalyticsService {
// Getting CAPTCHA chart data
(async () => {
- const { x, xShifted } = this.generateXAxis(
+ const { xShifted } = this.generateXAxis(
timeBucket,
from,
to,
@@ -1378,7 +1374,7 @@ export class AnalyticsService {
paramsData: object,
safeTimezone: string,
) {
- const { x, xShifted } = this.generateXAxis(
+ const { xShifted } = this.generateXAxis(
timeBucket,
from,
to,
@@ -1482,7 +1478,7 @@ export class AnalyticsService {
paramsData: object,
safeTimezone: string,
): Promise<object | void> {
- const { x, xShifted } = this.generateXAxis(
+ const { xShifted } = this.generateXAxis(
timeBucket,
from,
to,