Skip to content

Commit

Permalink
fix: show cookie banner if consent has neither been added/removed
Browse files Browse the repository at this point in the history
  • Loading branch information
silvester-pari committed Mar 19, 2024
1 parent 03fcaff commit abba740
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["requireCookieConsent"]);
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.earthcode.esa.int"]);
_paq.push(["setDomains", ["*.earthcode.esa.int", "*.earthcode.eox.at"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
Expand Down Expand Up @@ -84,6 +81,7 @@
></esa-footer>
<esa-cookies
link="https://www.esa.int/Services/Cookies_notice"
style="display: none"
></esa-cookies>
</div>
<script
Expand Down Expand Up @@ -168,6 +166,14 @@
_paq.push(["optUserOut"]);
});

if (
!document.cookie.includes("mtm_cookie_consent") &&
!document.cookie.includes("mtm_consent_removed")
) {
document.querySelector("esa-cookies").style.display = "block";
}

// TEMP
const style = document.createElement("style");
style.innerHTML = `@import "https://unpkg.com/@eox/[email protected]/css/main.css";`;
const append = setInterval(() => {
Expand Down

0 comments on commit abba740

Please sign in to comment.