Fix load ga. (#1998)

This commit is contained in:
nicolas 2021-03-10 06:03:56 -03:00 committed by GitHub
parent 5361aec9ee
commit b12e1906f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -129,6 +129,10 @@ const CookiesBanner = (): ReactElement => {
} }
setLocalAnalytics(acceptedAnalytics) setLocalAnalytics(acceptedAnalytics)
setLocalNecessary(acceptedNecessary) setLocalNecessary(acceptedNecessary)
if (acceptedAnalytics && !isDesktop) {
loadGoogleAnalytics()
}
} }
} }
fetchCookiesFromStorage() fetchCookiesFromStorage()
@ -162,10 +166,6 @@ const CookiesBanner = (): ReactElement => {
dispatch.current(openCookieBanner({ cookieBannerOpen: false })) dispatch.current(openCookieBanner({ cookieBannerOpen: false }))
} }
if (showAnalytics && !isDesktop) {
loadGoogleAnalytics()
}
if (showIntercom) { if (showIntercom) {
loadIntercom() loadIntercom()
} }