mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-25 06:30:00 +05:30
Catch error on Google Analytics loading
This commit is contained in:
parent
fe9de056df
commit
fb9f6e118e
@ -65,7 +65,8 @@ function initAnalytics() {
|
||||
if (window.GA_ID) {
|
||||
// when GA is not available, we will continue to push into array
|
||||
// for debug purposes
|
||||
loadScript('https://www.google-analytics.com/analytics.js');
|
||||
// Catch to prevent "unhandled rejection" error
|
||||
loadScript('https://www.google-analytics.com/analytics.js').catch(() => {});
|
||||
}
|
||||
|
||||
ga('create', window.GA_ID, 'auto');
|
||||
|
Loading…
Reference in New Issue
Block a user