Skip to content

Commit 1daa73d

Browse files
author
Artem
committed
send START_EVENT* for electron builds only
1 parent 0fe841a commit 1daa73d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

redisinsight/api/src/modules/server/server.service.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ export class ServerService implements OnApplicationBootstrap {
5252
appType: this.getAppType(SERVER_CONFIG.buildType),
5353
});
5454

55-
this.eventEmitter.emit(AppAnalyticsEvents.Track, {
56-
event: startEvent,
57-
eventData: {
58-
appVersion: SERVER_CONFIG.appVersion,
59-
osPlatform: process.platform,
60-
buildType: SERVER_CONFIG.buildType,
61-
},
62-
nonTracking: true,
63-
});
55+
// do not track start events for non-electron builds
56+
if (SERVER_CONFIG?.buildType.toUpperCase() === 'ELECTRON') {
57+
this.eventEmitter.emit(AppAnalyticsEvents.Track, {
58+
event: startEvent,
59+
eventData: {
60+
appVersion: SERVER_CONFIG.appVersion,
61+
osPlatform: process.platform,
62+
buildType: SERVER_CONFIG.buildType,
63+
},
64+
nonTracking: true,
65+
});
66+
}
6467
}
6568

6669
/**

0 commit comments

Comments
 (0)