improving tracking

This commit is contained in:
Christian Kellner
2024-12-03 14:23:09 +01:00
parent f8f911aa00
commit 324b14da50

View File

@@ -2,6 +2,7 @@ import Mixpanel from 'mixpanel';
import { getJobs } from '../storage/jobStorage.js';
import { getUniqueId } from './uniqueId.js';
import { config, inDevMode } from '../../utils.js';
import os from 'os';
const mixpanelTracker = Mixpanel.init('718670ef1c58c0208256c1e408a3d75e');
@@ -55,7 +56,8 @@ export function trackDemoAccessed() {
}
function enrichTrackingObject(trackingObject) {
const platform = process.platform;
const operating_system = os.platform();
const os_version = os.release();
const arch = process.arch;
const language = process.env.LANG || 'en';
const nodeVersion = process.version || 'N/A';
@@ -63,7 +65,8 @@ function enrichTrackingObject(trackingObject) {
return {
...trackingObject,
isDemo: config.demoMode,
platform,
operating_system,
os_version,
arch,
nodeVersion,
language,