-
Notifications
You must be signed in to change notification settings - Fork 181
Description
Vortex currently sends events to Mixpanel's Prod project only if it's a stable version, otherwise it is sent to Mixpanel's Dev project. This logic is based on semver prerelease tag.
We need to change this to send events to Dev only with internal builds, and anything user facing should be sent to Prod.
We should probably change the logic to be based on process.env.NODE_ENV === 'development' instead of app version.
I think here is a bug(?) that os is being sent during app_launched, but it isn't a Mixpanel special $os and so it isn't showing as Operating System. Might be something to do with the Mixpanel schema and needing the $
We might also want to add properties that are sent with the app_launched event. Either as a string or add more properties. For example...
export class AppLaunchedEvent implements MixpanelEvent {
readonly eventName = 'app_launched';
readonly properties: Record<string, any>;
constructor(
os: string,
appVersion: string,
osVersion: string,
electronVersion: string,
nodeVersion: string,
arch: string,
updateChannel: string,
locale?: string,
cpuCount?: number,
totalMemory?: number
) {
this.properties = {
os, // win32, darwin, linux
app_version: appVersion,
os_version: osVersion, // e.g., "10.0.22000" for Windows 11
electron_version: electronVersion,
node_version: nodeVersion,
arch, // x64, arm64, etc.
update_channel: updateChannel,
locale,
cpu_count: cpuCount,
total_memory_gb: totalMemory ? Math.round(totalMemory / (1024 ** 3)) : undefined,
};
}
}