Skip to content

Commit bfecb77

Browse files
committed
Merge branch 'staging' into release
2 parents c47f6f6 + 38382df commit bfecb77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

web/src/scripts/utils/Telemetry.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717

1818
class Telemetry {
1919
constructor() {
20-
this.ga = window.ga || () => {}
2120
this.lastFocusTime = Date.now()
2221
}
2322

2423
bindAppFocusListener() {
2524
window.addEventListener('focus', () => {
26-
this.ga('send', {
25+
window.ga && window.ga('send', {
2726
hitType: 'event',
2827
eventCategory: 'Window',
2928
eventAction: 'focus',
@@ -33,7 +32,7 @@ class Telemetry {
3332
})
3433

3534
window.addEventListener('unload', () => {
36-
this.ga('send', {
35+
window.ga && window.ga('send', {
3736
hitType: 'event',
3837
eventCategory: 'Window',
3938
eventAction: 'unload',

0 commit comments

Comments
 (0)