cookiebot
Forum Replies Created
-
The reason barbastathis.com shows English, is because your browser language is set to English. If you browser language was set to Greek, it would shown in Greek. This is the auto-detect feature of Cookiebot.
You can check your personal browser language with this code:
<script type="text/javascript"> var userLang = navigator.language || navigator.userLanguage; alert ("The language is: " + userLang); </script>If you want to enforce a specific language, you can use the data-culture attribute.
Can you insert below code on your Greek website:
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-culture="EL" data-cbid="e89a4ff3-3f95-43d3-8505-ef94dd059c84" type="text/javascript" async></script>and on your English website:
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-culture="EN" data-cbid="e89a4ff3-3f95-43d3-8505-ef94dd059c84" type="text/javascript" async></script>?
Let’s solve one problem at a time.
In you WordPress site, chose “Use WordPress Language” under the Cookiebot Language option. See this screenshot: http://prntscr.com/lk6091
Also, add both Greek and English in the Manager, described here.
Does it work?
@pramakrishna which version of Mozilla are you using? Can’t seem to replicate it with Firefox Developer Edition.
By inspecting the button
cookieoptout(marketing opt-out), there is a click event with the below code:function() { var g = document.getElementById("cookieoptout"); g.setAttribute("style", "background: #fff; display:none;"); var h = document.getElementById("cookiechange"); h.style.display = "block"; Cookiebot.consent.marketing = false; // console.log("Marketing is false", Cookiebot.consent.marketing); }Apparently you are setting the value of
Cookiebot.consent.marketingdirectly. You should use the functionCookiebot.submitCustomConsent(bool, bool, bool)Hi @pramakrishna,
How do you test that it is not working?
If you write
Cookiebot.submitCustomConsent(false, false, false)in the developer Console, and afterwards check the values ofCookiebot.consent.preferences Cookiebot.consent.statistics Cookiebot.consent.marketingYou will see that they are all false.
Every time we consent on that site however, we get the following error:
SecurityError: Permission denied to access property “frameElement” on cross-origin object
Could you check if the logic behind accessing frameElement is what is causing your issue, as it seems not to be Cookiebots fault.
- This reply was modified 7 years, 6 months ago by cookiebot.
Hi @gijsgg,
Necessary cookies do not require consent. If you check the banner at cookiebot.com, the necessary category cannot be deselected. If you iframe only contains necessary cookies, you do not need to display a placeholder.
Glad to hear you got it working @pramakrishna!
Dont forget to review 🙂
Regards- This reply was modified 7 years, 6 months ago by cookiebot.
Glad you got your problems fixed.
Suppose I have 2 button as options for the user to Opt-in and Opt-out for Statistics cookies:
Opt-in Cookiebot.submitCustomConsent(true,true,false)
Opt-out Cookiebot.submitCustomConsent(true,false,false)You should use:
Opt-in
Cookiebot.submitCustomConsent(Cookiebot.consent.preferences,true,Cookiebot.consent.marketing)
Opt-outCookiebot.submitCustomConsent(Cookiebot.consent.preferences,false,Cookiebot.consent.marketing)This way you keep the original consent state for preferences and marketing, and only change statistics. Same approach applies for your marketing opt-in and opt-out buttons.
Furthermore, if you want to check whether or not the changes have taken effect, you can call:
Cookiebot.renew();which will popup the banner with the current state.Let us know if you need further assistance.
@pramakrishna We have updated our API to support your needs.
Instead of using the banner to change consent, you can call:
Cookiebot.submitCustomConsent(optinPreferences, optinStatistics, optinMarketing)Where optinPreferences, optinStatistics, optinMarketing are bool values.
If you only want to change one consent category, you can retrieve what the user has already selected for the other categories, through the Cookiebot object.
Cookiebot.consent.preferences Cookiebot.consent.statistics Cookiebot.consent.marketingHope this helps!
@pramakrishna We have updated our API to support your needs.
Instead of using the banner to change consent, you can call:
Cookiebot.submitCustomConsent(optinPreferences, optinStatistics, optinMarketing)Where optinPreferences, optinStatistics, optinMarketing are bool values.
If you only want to change one consent category, you can retrieve what the user has already selected for the other categories, through the Cookiebot object.
Cookiebot.consent.preferences Cookiebot.consent.statistics Cookiebot.consent.marketingHope this helps!
We have just tested Polylang with the setting “Use WordPress Language”, and it works for us.
It seems that you are using a cache plugin. Can you try to clear your WP cache (through the cache plugin) after you set the language to: “Use WordPress Language”, and test again?
Also, could you check if “Use WordPress Language” will set the correct language?
See this screenshot: http://prntscr.com/lcmmjm
Alright, so you do not want auto-detect, but you want it to enforce a specific language, depending on whether the user is browsing /en (English) or / (Danish).
Are you using any plugins for translating your site website?
As we have recieved no response we’ll go ahead and close this issue for now. Let us know if you need further assistance.