diff --git a/404.html b/404.html
index bebfb56..2e3ce5d 100644
--- a/404.html
+++ b/404.html
@@ -4,6 +4,22 @@
+
+
+
+
diff --git a/about.html b/about.html
index 8c347ec..39eab10 100644
--- a/about.html
+++ b/about.html
@@ -4,6 +4,22 @@
+
+
+
+
diff --git a/contact.html b/contact.html
index 96b81bc..8b895f6 100644
--- a/contact.html
+++ b/contact.html
@@ -4,6 +4,22 @@
+
+
+
+
diff --git a/dmca.html b/dmca.html
index 3f94df4..d7dc1b1 100644
--- a/dmca.html
+++ b/dmca.html
@@ -4,6 +4,22 @@
+
+
+
+
DMCA — Poki2
diff --git a/index.html b/index.html
index c9b9036..97e28b6 100644
--- a/index.html
+++ b/index.html
@@ -5,6 +5,22 @@
+
+
+
+
diff --git a/js/consent.js b/js/consent.js
index 7a982d5..4168294 100644
--- a/js/consent.js
+++ b/js/consent.js
@@ -1,5 +1,11 @@
const CONSENT_KEY = 'poki2_consent_v1';
const ADS_SRC = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6199549323873133';
+const GA_CONSENT_GRANTED = {'analytics_storage':'granted','ad_storage':'granted','ad_user_data':'granted','ad_personalization':'granted'};
+const GA_CONSENT_DENIED = {'analytics_storage':'denied', 'ad_storage':'denied', 'ad_user_data':'denied', 'ad_personalization':'denied'};
+
+function _updateGaConsent(params){
+ try{ if(typeof gtag==='function') gtag('consent','update',params); }catch(e){}
+}
function getConsent(){
try{ return localStorage.getItem(CONSENT_KEY); }catch(e){return null}
@@ -12,9 +18,11 @@ function setConsent(v){
}catch(e){}
try{
if(v === 'granted'){
+ _updateGaConsent(GA_CONSENT_GRANTED);
try{ initAds(); }catch(e){}
try{ document.dispatchEvent(new CustomEvent('poki2:consent-granted')); }catch(e){}
}else if(v === 'denied'){
+ _updateGaConsent(GA_CONSENT_DENIED);
try{ document.dispatchEvent(new CustomEvent('poki2:consent-denied')); }catch(e){}
}
}catch(e){}
@@ -563,6 +571,7 @@ window.poki2Consent = {
const status = getConsent();
if(status === 'granted'){
try{ initAds(); }catch(e){}
+ _updateGaConsent(GA_CONSENT_GRANTED);
}
const cleanup = ()=>{
try{
diff --git a/privacy.html b/privacy.html
index 8f1696f..bd47065 100644
--- a/privacy.html
+++ b/privacy.html
@@ -4,6 +4,22 @@
+
+
+
+
Privacy — Poki2
diff --git a/terms.html b/terms.html
index 70e5e5b..44e0af4 100644
--- a/terms.html
+++ b/terms.html
@@ -4,6 +4,22 @@
+
+
+
+
Terms — Poki2