Adding another button to customer banner to invoice Cookiebot.renew()
Hi,
I am trying to figure out how to add a button that would bring up the cookie settings from a custom banner. I used the following, and while it did show the button right next to the OK button. It would not bring up the cookie settings window where a user can select which category they want to opt out of. Could you possibly help me in this area.
<a href="javascript: Cookiebot.renew()" class="prefbutton">Cookie Preferences</a>
.prefbutton {
background-color: #1c87c9;
border: none;
color: white;
padding: 20px 34px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
margin: 4px 2px;
cursor: pointer;
}
-
Hi Ryan,
The easiest way to display cookie categories on your banner is to use Multilevel type instead of custom banner/dialog and then to add link for renew consent.
However, if you would like to continue using custom banner then you could "pop-up" the banner for renewal or withdraw using the cookiebot API. There is a withdraw() and renew() function on the Cookiebot object in case that you want a totally custom implementation, not spawning up the banner, you can use submitCustomConsent.
You could find more information about this at www.cookiebot.com/goto/developer/
You could also use the link which is placed on the Cookie Declaration page for renew or withdraw consent. Clicking the link for renew or withdraw consent would show up the consent banner again.
Regards,
Spas0
Please sign in to leave a comment.
Comments
1 comment