Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / lib / desktop / reportClientLaunch.ts
blob15c17b119c16cc4d7fb6b4dc75d6c33d36b6eaaf
1 import type { Api } from '@proton/shared/lib/interfaces';
3 import { TelemetryDesktopEvents, TelemetryMeasurementGroups } from '../api/telemetry';
4 import { DESKTOP_PLATFORMS } from '../constants';
5 import { sendTelemetryReport } from '../helpers/metrics';
7 export async function reportClientLaunch(installSource: string | null, product: 'mail' | 'pass', api: Api) {
8     if (typeof installSource !== 'string') {
9         return;
10     }
12     await sendTelemetryReport({
13         api,
14         event: TelemetryDesktopEvents.client_first_launch,
15         measurementGroup: TelemetryMeasurementGroups.clientInstalls,
16         dimensions: {
17             client: DESKTOP_PLATFORMS.WINDOWS,
18             product,
19             install_source: installSource,
20         },
21     });