pramakrishna
Forum Replies Created
-
Here, the main problem that is happening is that function “submitCustomConsent” doesn’t change the cookie consent on Mozilla. But when clicked “I accept” inside the banner, only then it changes the cookie consent. And this is happening only on Mozilla Firefox browser.
Yes, that is used inside the button.
<p style=""> <button id="cookieoptoutga" style="display: block;"> <a class="bttn" href="javascript: Cookiebot.submitCustomConsent(Cookiebot.consent.preferences,false,Cookiebot.consent.marketing); Cookiebot.hide();" style="">Opt Out</a> </button> </p>It changes the cookie consent using this button on all browsers except Mozilla Firefox
Hi,
When you go to this page “https://mts.betradar.com/cookies/” and click on the button “I accept” inside the banner and then you try to opt-out from the “marketing” cookie by clicking the opt-out for example, then you see the color of the button changes and the text also changes to opt-in. But when you inspect the cookie status inside the inspector of Mozilla Firefox, you can see that marketing is still true and even after clicking the button multiple times, the consent of marketing never changes (even after page refresh).
But works fine on Chrome, Microsoft Edge, Safari and Chromium browsers
Hi,
there is a bug in this new function
Cookiebot.submitCustomConsent(optinPreferences, optinStatistics, optinMarketing)This doesn’t work on Mozilla. But works fine on Chrome and Edge.
It doesn’t change the cookie consent at all
Hi,
Thanks. It worked fine.
Hi,
Finally the above 2 problems were solved. But there is a drawback in the update provided:
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)And in the same way below for Marketing cookies
Opt-in Cookiebot.submitCustomConsent(true, true, true)
Opt-out Cookiebot.submitCustomConsent(true, true, false)In the above options, you can see that the user will have a confusion, when he has opted-out from “Statistics” cookies and still wants to be opted-in for Marketing cookies, then its not possible with 2 combinations of buttons. I will have to create 4 combinations for him to select. Because this update is similar to the function “withdraw” which withdraws from all cookies at once and this function “submitCustomConsent” requires parameters to be passed for all cookies at once and not for separate cookies.
Is it possible to create separate opt-out functions as per cookies than having 3 cookies inside one function called “submitCustomConsent” like Submit marketing consent, Submit Statistics content ?
Hi,
Actually I found out another solution using the one you mention above
Cookiebot.consent.preferences Cookiebot.consent.statistics Cookiebot.consent.marketingSo, here I added some code of my own inside the Cookiebot dashboard having cookie declaration and consent dialog
<p style=""><button class="cookiechange" style="border:unset;display:flex;background:rgb(49, 49, 49) !important;"><a href="javascript:void(0);" style="">Change your cookie consent</a></button></p> <p style=""></p>So my idea was to change the cookie consent of the user on click of the button having the class == cookiechange
And I gave the function for it inside my javascript file. But I see that we cannot use our own function call. Something like this:
<script type="text/javascript"> $( document ).ready(function() { $('.CookieDeclarationType .cookiechange').on("click", function(e) { e.preventDefault(); console.log("Execute code that sets marketing cookies"); if (Cookiebot.consent.marketing) { console.log("Marketing is true", Cookiebot.consent.marketing); Cookiebot.consent.marketing = false; console.log("Marketing is false now", Cookiebot.consent.marketing); Cookiebot.submitCustomConsent(true, true, false); } }); }); </script>Is that true we cannot use our own function call from the dashboard to our javascript file??
Hi,
Thanks for the quick update. Could I use the Cookiebot submit consent like this ?
<p style=""><button style="border:unset;display:flex;background:rgb(49, 49, 49) !important;"><a href="javascript: Cookiebot.submitCustomConsent(true, true, true)" style="color:#e7e738;">Change your cookie consent</a></button></p> <p style=""></p>Hi,
Okay then is it possible to customize the plugin in such a way where we can have buttons to opt-in and opt-out from separate cookies like marketing/ statistics ??
Yes I found out another solution to overcome “Cookiebot” is not defined error. So that is ok.
Can you please tell me how I can withdraw from a particular Cookie(eg say Marketing) on button click ??
And at the same time accept the consent to “true“ for a particular Cookie like Marketing on button click ??
Currently there is one function which withdraws from all cookies
Can you let me know whether that’s possible ?? Or as you mentioned above, isn’t that not possible as well ??
Hi,
This is the site where we are currently using the banner template as checkboxes.
https://sportradar.com/about-us/cookies/
But in the places inside the table detail description of the cookies where there are red button called “Change your cookie consent”, we want to add a button called “opt-in” or “opt-out” which gives the user an option to withdraw from one particular cookie like marketing and not withdraw from all cookies at once.
And use the banner template as just “allow all cookies” and not checkboxes.
Each and everything is fine… the banner is working and I am also displaying the full description inside my cookie page with table description. And all that is fine.
<script id=”Cookiebot” src=”https://consent.cookiebot.com/uc.js” data-cbid=”” type=”text/javascript” async=””></script>
And in the above tag, I havent purposefully added the data-cbid since its private. But yes I have added the Cookiebot ID too inside my wordpress.
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”.
So can you suggest me if there is any particular solution for that ?
I am trying to create a function where we can withdraw from one particular cookie for eg marketing/statistics only when we are using a banner with “Allow all cookies” button without any checkboxes.
So is there a way that I can use a function instead of calling “withdraw” like this Withdraw from cookie consent which will withdraw from all cookies except necessary at once ? So that I can just call withdraw for a particular cookie like marketing ?
Hi,
Thanks for the quick reply. I am using the WordPress plugin so the script tag is automatically added to the head section like this
<script id=”Cookiebot” src=”https://consent.cookiebot.com/uc.js” data-cbid=”” type=”text/javascript” async=””></script>
And also, to give you the link, its a little difficult because I’m currently testing on my internal staging WordPress link.
This link is absolutely fine
“window.addEventListener(‘CookiebotOnAccept’, function (e) {”Its giving error only for this line “if (Cookiebot.consent.marketing)”
Especially for this line “Cookiebot.consent.marketing”
Its a little urgent task. So I would appreciate for a quick response
Thanks in advance.