mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-28 07:50:32 +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) {
|
if (window.GA_ID) {
|
||||||
// when GA is not available, we will continue to push into array
|
// when GA is not available, we will continue to push into array
|
||||||
// for debug purposes
|
// 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');
|
ga('create', window.GA_ID, 'auto');
|
||||||
|
Loading…
Reference in New Issue
Block a user