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.2",
"version": "2.4.3",
"license": "GPL-3.0-only",
"author": "AesirX",
"repository": "https://gitlab.redweb.dk/aesirx/analytics",
Expand Down
4 changes: 4 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const startTracker = async (
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const ip = '';
const userTimeZone = Intl.DateTimeFormat().resolvedOptions()?.timeZone;

try {
const fingerprint = getFingerprint();
Expand Down Expand Up @@ -76,6 +77,7 @@ const startTracker = async (
browser_version: browser_version,
lang: lang,
device: device?.includes('iPhone') ? 'mobile' : device?.includes('iPad') ? 'tablet' : device,
timezone: userTimeZone,
...(attributes?.length && {
event_name: 'visit',
event_type: 'action',
Expand Down Expand Up @@ -127,6 +129,7 @@ const trackEvent = async (endpoint: string, referer?: string, data?: object, _ur
const lang = window.navigator['userLanguage'] || window.navigator.language;
const device = browser?.platform?.model ?? browser?.platform?.type;
const ip = '';
const userTimeZone = Intl.DateTimeFormat().resolvedOptions()?.timeZone;

const fingerprint = getFingerprint();
const headers = { type: 'application/json' };
Expand All @@ -144,6 +147,7 @@ const trackEvent = async (endpoint: string, referer?: string, data?: object, _ur
browser_name: browser_name,
browser_version: browser_version,
lang: lang,
timezone: userTimeZone,
device: device?.includes('iPhone')
? 'mobile'
: device?.includes('iPad')
Expand Down