Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 40ce9a5

Browse files
authored
Merge pull request #3175 from withspectrum/attribute-tracking-to-desktop
Attribute desktop analytics to desktop client
2 parents 41b0bfb + ecc4903 commit 40ce9a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/helpers/analytics/track.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @flow
2-
2+
import { isDesktopApp } from '../is-desktop-app';
33
const amplitude = window.amplitude;
4-
54
export const track = (eventType: string, eventProperties?: Object = {}) => {
65
if (!amplitude) {
76
console.warn('No amplitude function attached to window');
@@ -22,7 +21,7 @@ export const track = (eventType: string, eventProperties?: Object = {}) => {
2221
// console.warn(`[Amplitude] Tracking ${eventType}`);
2322
return amplitude.getInstance().logEvent(eventType, {
2423
...eventProperties,
25-
client: 'web',
24+
client: isDesktopApp() ? 'desktop' : 'web',
2625
});
2726
};
2827

0 commit comments

Comments
 (0)