From 6136b9b4fff9d8fbbfc8fef8f62d337738c3accd Mon Sep 17 00:00:00 2001 From: Gia Phu Date: Fri, 14 Feb 2025 09:50:35 +0700 Subject: [PATCH 1/3] fix config --- tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 74bb25c..e2ce556 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,10 +7,9 @@ "declarationDir": "types", "module": "ESNext", "target": "es2020", - "noImplicitAny": true, + "noImplicitAny": false, "noImplicitThis": true, "removeComments": false, - "suppressImplicitAnyIndexErrors": true, "ignoreDeprecations": "5.0", "sourceMap": true, "pretty": true, From cd03dc855ae941b1ce0f3655988a37f0c61c3eaa Mon Sep 17 00:00:00 2001 From: Viet Date: Tue, 18 Mar 2025 09:06:36 +0700 Subject: [PATCH 2/3] Prepare to release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa8d11b..a63db12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aesirx-analytics", - "version": "2.4.0", + "version": "2.4.1", "license": "GPL-3.0-only", "author": "AesirX", "repository": "https://gitlab.redweb.dk/aesirx/analytics", From 25ecacadc6c8f612fea9e49394533c1ae21a4d33 Mon Sep 17 00:00:00 2001 From: Viet Date: Wed, 23 Apr 2025 17:04:17 +0700 Subject: [PATCH 3/3] Update trackEvent --- package.json | 2 +- src/utils/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a63db12..e8fe3a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aesirx-analytics", - "version": "2.4.1", + "version": "2.4.2", "license": "GPL-3.0-only", "author": "AesirX", "repository": "https://gitlab.redweb.dk/aesirx/analytics", diff --git a/src/utils/index.ts b/src/utils/index.ts index 050c2d0..d71e7a5 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -102,7 +102,7 @@ const startTracker = async ( } }; -const trackEvent = async (endpoint: string, referer?: string, data?: object) => { +const trackEvent = async (endpoint: string, referer?: string, data?: object, _url?: string) => { const allow = sessionStorage.getItem('aesirx-analytics-allow'); const reject = sessionStorage.getItem('aesirx-analytics-rejected'); if (allow === '0' || reject === 'true') { @@ -119,7 +119,7 @@ const trackEvent = async (endpoint: string, referer?: string, data?: object) => ? location.protocol + '//' + location.host : location.protocol + '//' + location.host + window['referer'] : ''; - const url = location.protocol + '//' + location.host + location.pathname; + const url = _url ? _url : location.protocol + '//' + location.host + location.pathname; const user_agent = window.navigator.userAgent; const browser = Bowser.parse(window.navigator.userAgent); const browser_name = browser?.browser?.name;