Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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;
Expand Down