mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2024-12-29 10:29:48 +01:00
fix cookie consent status
This commit is contained in:
parent
fdc0973f15
commit
afdc36f199
@ -12,8 +12,6 @@ import '../assets/styles/ccElegantBlack.css';
|
|||||||
document.body.classList.add('cc--elegant-black');
|
document.body.classList.add('cc--elegant-black');
|
||||||
|
|
||||||
function checkCookieConsent() {
|
function checkCookieConsent() {
|
||||||
// this cookie consent use cookie to store the consent status, but our webiste v2 use localStorage
|
|
||||||
// this is used to compliant with v2
|
|
||||||
const consentStatus = localStorage.getItem('cookie-accepted');
|
const consentStatus = localStorage.getItem('cookie-accepted');
|
||||||
return consentStatus === 'true';
|
return consentStatus === 'true';
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ export const config: CookieConsentConfig = {
|
|||||||
'<a href="https://marketingplatform.google.com/about/analytics/terms/us/" target="_blank">Google Analytics 4 (dummy)</a>',
|
'<a href="https://marketingplatform.google.com/about/analytics/terms/us/" target="_blank">Google Analytics 4 (dummy)</a>',
|
||||||
onAccept: () => {
|
onAccept: () => {
|
||||||
// TODO: load ga4
|
// TODO: load ga4
|
||||||
|
localStorage.setItem('cookie-accepted', 'true');
|
||||||
},
|
},
|
||||||
onReject: () => {
|
onReject: () => {
|
||||||
console.log('ga4 rejected');
|
console.log('ga4 rejected');
|
||||||
|
Loading…
Reference in New Issue
Block a user