Skip to content

Commit

Permalink
fix: making navigator and connection optional
Browse files Browse the repository at this point in the history
  • Loading branch information
agrim-deriv committed Nov 12, 2024
1 parent 6354b70 commit d6a76fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/scripts/analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ const cacheTrackEvents = {
window.Analytics.Analytics.pageView(window.location.href, {
loggedIn: !!clientInfo,
device_type: signupDevice,
network_type: navigator.connection?.effectiveType,
network_rtt: navigator.connection?.rtt,
network_downlink: navigator.connection?.downlink,
network_type: window?.navigator?.connection?.effectiveType,
network_rtt: window?.navigator?.connection?.rtt,
network_downlink: window?.navigator?.connection?.downlink,
});
}

Expand Down

0 comments on commit d6a76fd

Please sign in to comment.