cookiebot
Forum Replies Created
-
Hi @velin
Thanks for reaching out.
Inside the Cookiebot plugin, you can choose which language your banner should display. By default, Cookiebot is set to autodetect, which means it will try to detect where there user is from, and show the banner in the users language. All languages that you want auto-detected should be added in the Manager.
See this screenshot: http://prntscr.com/lclakc
More information is also available here: https://support.cookiebot.com/hc/en-us/articles/360003793394-How-do-I-set-the-language-of-the-consent-banner-dialog-
@pramakrishna as previously answered it is not currently possible to give consent by not using the banner.
Hi @kjaersoeren
The embed code looks like this:
<div class="infogram-embed" data-id="_/LbgSk2kucbdLGe9a9t09" data-type="interactive" data-title="Chart - Features Page"></div> <script> ! function(e, t, n, s) { var i = "InfogramEmbeds", o = e.getElementsByTagName(t)[0], d = /^http:/.test(e.location) ? "http:" : "https:"; if (/^\/{2}/.test(s) && (s = d + s), window[i] && window[i].initialized) window[i].process && window[i].process(); else if (!e.getElementById(n)) { var a = e.createElement(t); a.async = 1, a.id = n, a.src = s, o.parentNode.insertBefore(a, o) } }(document, "script", "infogram-async", "https://e.infogram.com/js/dist/embed-loader-min.js"); </script>Try changing the first
<script>tag to<script type="text/plain" data-cookieconsent="marketing">and see if it works. (Also described in our help section 3)Moreover, you can add placeholders that are visible only when marketing has not been accepted. A suggestion:
<div class="cookieconsent-optout-marketing"> Please <a href="Cookiebot.renew()">accept marketing-cookies</a> to see this graph. </div>Hi @greenlabel
We appreciate your feedback! It seems that WP forgot to add some stars :O 🙂
The Cookiebot API does not support that currently. You can read consent from it. If you want to change a users consent, you’ll have to use the Cookiebot.renew(); function, which pops up your banner. In future releases, we may add the opportunity to change consent, without having to use the banner. Thanks for your understanding and patience.
If you were to add the event listener mentioned above, to the page that you link to, it should work.
Can you reproduce the
“Cookiebot” is not defined
issue?
As for your other question, it is currently only possible to control a users consent through the banner, so unfortunately there is no easy way of creating a custom implementation, where the banner is a full-opt in, and the “Change your cookie consent” is a custom implementation, giving the user the ability to opt-in to specific categories (by not using the banner).
- This reply was modified 7 years, 6 months ago by cookiebot.
Its just that I am getting an error for this line “Cookiebot.consent.marketing” when I compile my code and I am trying that functionality where a user can opt-out or opt-in from a particular cookie (say marketing or statistics) with a “button” and not “checkbox”.
Before we go into creating different templates for the banner, we should get that event handler working.
Once uc.js (Cookiebot) is added to the DOM, the Cookiebot object is accessible globally. The code you have supplied for the event handler looks correct, however, for some reason, it can’t reach the Cookiebot object, thus giving you an error.
In order to proceed debugging this issue, you’ll have to supply us with a link, or recreate the issue on an environment that is accessible to us.
And in the above tag, I havent purposefully added the data-cbid since its private.
The data-cbid is available for all your visistors.
Can you verify that you have added a Cookiebot ID in the Cookiebot WordPress plugin? If you do not add an ID, uc.js will not be rendered on your page, and thus the Cookiebot object will not be available. By looking at your sample code, there is no Cookiebot ID.
You can add your staging domain (localhost, 127.0.0.1) or whatever you use as an alias in the Manager, which is free of charge. For more information on test domains, have a look here: https://support.cookiebot.com/hc/en-us/articles/360003794134-Why-is-the-cookie-consent-banner-dialog-not-showing-on-my-website-
- This reply was modified 7 years, 6 months ago by cookiebot.
Hi @mariusandersen,
Thanks for reaching out, and sorry for the slow response!
Did you test with a real device or with Stackify?
We’ll go ahead and mark this as resolved for now @zoricamicanovic
Hi @pramakrishna,
Thanks for reaching out.
This happens when the Cookiebot script (uc.js) is not added to the website that you are trying to use the code on.
How are you adding Cookiebot to your site? Would it be possible to update your question with a link so that we can test. Otherwise, you can also send us a link at: wpsupport@cybot.com – Thanks!
Great, the currentUserPageCulture is being set correctly.
I checked your code, and the event listener looks like this:
window.addEventListener("CookiebotOnDialogInit", function(a) { currentUserPageCulture = "eu"; CookiebotDialog.multiAcceptText = "DE ACUERDO" }, !1);Can you change it to:
window.addEventListener("CookiebotOnDialogInit", function(a) { if (currentUserPageCulture == "eu") { CookiebotDialog.multiAcceptText = "ONARTU"; // Basque } else if(currentUserPageCulture == "es") { CookiebotDialog.multiAcceptText = "ACEPTO"; // Spanish } else if(currentUserPageCulture == "en") { CookiebotDialog.multiAcceptText = "ACCEPT"; // English } else{ // Use default CookiebotDialog.multiAcceptText = "ACEPTO"; // Spanish } }, false);What went wrong in https://wordpress.org/support/topic/configuration-details-toggle-in-custom-popup/#post-10737433 is that you were not using
==in the if statements, you were using a single=sign.@erreeme the code to set currentUserPageCulture should run on every page load.
Can you try to debug by logging to console:
console.log("setting currentUserPageCulture: " + currentUserPageCulture );This could be after the code that sets currentUserPageCulture.