🐛 répare la page blanche sur firefox

pull/1450/head
Johan Girod 2021-03-23 18:02:44 +01:00
parent 369c2b43de
commit c10d2d8561
2 changed files with 5 additions and 7 deletions

View File

@ -23,12 +23,10 @@ import { inIframe } from './utils'
const ATTracker = createTracker(
process.env.AT_INTERNET_SITE_ID,
!!JSON.parse(
safeLocalStorage.getItem('tracking:do_not_track') ??
navigator.doNotTrack ??
'false'
)
safeLocalStorage.getItem('tracking:do_not_track') === '1' ||
navigator.doNotTrack === '1'
)
declare global {
interface Window {
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any

View File

@ -35,10 +35,10 @@ function PrivacyContent() {
(evt) => {
if (evt.target.checked) {
tracker.privacy.setVisitorOptout()
safeLocalStorage.setItem('tracking:do_not_track', 'true')
safeLocalStorage.setItem('tracking:do_not_track', '1')
} else {
tracker.privacy.setVisitorMode('cnil', 'exempt')
safeLocalStorage.setItem('tracking:do_not_track', 'false')
safeLocalStorage.setItem('tracking:do_not_track', '0')
}
setValueChanged(true)
},