Hide cookie dialog on specific pages
We have a SPA website. The site of course has a couple of pages describing privacy and cookie policy. These pages cannot be read when the user has not accepted cookies. Now the customer wants to disable the cookie dialog on these pages. Is this possible?
I have tried hiding the dialog with Cookiebot.hide(), but this method only works when the dialog is displayed.
Is there anyway of doing this?
-
Hey David,
If the user visit your pages without the dialog, it's looks like his/her consent is not given or asked at all. From that standpoint, it`s not be a good solution to hide the dialog. But please give more info about the domain and add inquiry via support system or email:
support@cookiebot.com
https://support.cookiebot.com/hc/en-us/requests/newRegards.
0 -
Hello again David,
if you have not yet contacted support there is a script that you can hide the dialog without setting cookies.
Please add it to pages about describing privacy and cookie policy and they shouldn't show the banner:<script>
window.addEventListener(
"CookiebotOnDialogInit",
function (e) {
if (Cookiebot.consent.stamp == 0 && this.top.location !== this.location) {
Cookiebot.submitCustomConsent(!1, !1, !1);
window.addEventListener(
"CookiebotOnLoad",
function (e) {
Cookiebot.deleteConsentCookie();
},
false
);
}
},
false
);
</script>0 -
Hi Martin
Great, thanks. I will give it a try.
0 -
Hi Martin,
Thank you for the Javascript code to hide the dialog, however it does not seem to be working for me. Do you know if anything has changed, and if they renamed any of the methods used? Let me know if you have any other insight. I am trying to disable this dialog within a page in Wordpress.
0 -
Hi Team,
There is an export PDF functionality on our website. But after accepting the consent popup when we try to export any pdf, we got a popup overlapping the content.
Please help me with that as soon as possible.
I have used the following piece of code to hide the consent popup but it disabled the marketing, statistics, and preferences cookie.
<script>
window.addEventListener("CookiebotOnDialogInit", function () {
if (!Cookiebot.consented) {
Cookiebot.submitCustomConsent(!1, !1, !1);
window.addEventListener("CookiebotOnConsentReady", function () {
Cookiebot.deleteConsentCookie();
});
}
});
</script>0
Please sign in to leave a comment.
Comments
5 comments