Select your interface:
You are currently viewing instructions for the: Manager
Coding skills and knowledge of
HTML,
CSS, and JavaScript are required in order to build a custom banner.
You need to apply your own coding logic to how your custom banner looks and behaves.
We are unable to provide you support with custom built temples.
With a Premium subscription, the cookie consent banner can be styled in a number of ways using the built-in templates and CSS styling, see Can I style the cookie consent banner?
However, you can also craft your own custom banner (Premium subscriptions only)
How do I get started with the custom template?
- Log in to your account https://manage.cookiebot.com/goto/login
- Go to ‘Settings’ and click the ‘Banner’ tab
- From the ‘Banner template’ drop-down menu select ‘Custom’
What can I use to build my banner?
The code editor is a third party solution named
Ace. Therefore there are some known limitations which we are sadly unable to resolve. An example of this is that the
CSS editor unjustly identifies
CSS variables as erroneous code.
1. HTML, CSS and JavaScript
When you have chosen the ‘Custom’ template, you will see examples of the HTML definitions, the CSS and the JavaScript functions you can use to build your banner (do remember to scroll within each one to reveal more lines of code).
You can change the name of functions to show and to hide the cookie consent banner, if you would like.
Remember to save your settings (tick mark in the blue bar on the left-hand side).
2. HTML placeholders and naming conventions
By clicking the small grey question mark on the upper right corner, you will get access to the HTML placeholders and naming conventions you can use. Scroll to see all of them.
The HTML placeholders you use will dynamically be replaced with the relevant content from your Cookiebot configuration.
Further down you will find ID attribute values you can use on your HTML elements for various button events.
Remember to save your settings (tick mark in the blue bar on the left-hand side).
3. Cookiebot SDK
If you prefer, you can use the Cookiebot SDK to have access to Cookiebot methods and properties. The SDK is available here: https://www.cookiebot.com/goto/developer
Remember to save your settings (tick mark in the blue bar on the left-hand side).
- Log into the Admin.
- Select "Configuration" from the left-hand menu.
- Click "Templates" in the upper left corner.
- Check the option labeled "Custom code" and click the "Next >" button.
- You can now craft your banner using HTML, CSS, and JavaScript.
- Remember to save your changes using the "Save changes" button in the upper right corner.
HTML placeholders and naming conventions
You have placeholders at your disposal when crafting a custom banner. These HTML placeholders will dynamically be replaced with the relevant content from the "Content" tab under the "Configuration" section of the Admin.
Here is the list of these HTML content placeholders:
Placeholder name |
Description |
[#TITLE#] |
Banner headline |
[#TEXT#] |
Banner text |
[#ACCEPT#] |
Accept button text |
[#DECLINE#] |
Decline button text |
[#LEVELOPTIN_ALLOWALL#] |
Text in [Allow all] button |
[#LEVELOPTIN_ALLOW_SELECTION#] |
Text in [Allow selection] button |
[#DETAILS#] |
Show details label |
[#DETAILSHIDE#] |
Hide details label |
[#LANGUAGE#] |
Current language code |
[#TEXTDIRECTION#] |
Current language text direction (LTR or RTL) |
[#COOKIESGENERALINTRO#] |
General cookie introduction |
[#ABOUTCOOKIES#] |
About Cookies label |
[#COOKIESOVERVIEW#] |
Cookies Declaration label |
[#LASTUPDATED#] |
Declaration last updated date label |
[#COOKIETYPE_NECESSARY#] |
Necessary cookies category title - Including cookie type count |
[#COOKIETYPE_NECESSARY_RAW#] |
Necessary cookies category title |
[#COOKIETYPEINTRO_NECESSARY#] |
Necessary cookies introduction |
[#COOKIETABLE_NECESSARY#] |
Table with details on cookies of this type |
[#COOKIETYPE_PREFERENCE#] |
Preference cookies category title - Including cookie type count |
[#COOKIETYPE_PREFERENCE_RAW#] |
Preference cookies category title |
[#COOKIETYPEINTRO_PREFERENCE#] |
Preference cookies introduction |
[#COOKIETABLE_PREFERENCE#] |
Table with details on cookies of this type |
[#COOKIETYPE_STATISTICS#] |
Statistics cookies category title - Including cookie type count |
[#COOKIETYPE_STATISTICS_RAW#] |
Statistics cookies category title |
[#COOKIETYPEINTRO_STATISTICS#] |
Statistics cookies introduction |
[#COOKIETABLE_STATISTICS#] |
Table with details on cookies of this type |
[#COOKIETYPE_ADVERTISING#] |
Marketing cookies category title - Including cookie type count |
[#COOKIETYPE_ADVERTISING_RAW#] |
Marketing cookies category title |
[#COOKIETYPEINTRO_ADVERTISING#] |
Marketing cookies introduction |
[#COOKIETABLE_ADVERTISING#] |
Table with details on cookies of this type |
[#COOKIETYPE_UNCLASSIFIED#] |
Unclassified cookies category title - Including cookie type count |
[#COOKIETYPE_UNCLASSIFIED_RAW#] |
Unclassified cookies category title |
[#COOKIETYPEINTRO_UNCLASSIFIED#] |
Unclassified cookies introduction |
[#COOKIETABLE_UNCLASSIFIED#] |
Table with details on cookies of this type |
To automatically hook up button events on your HTML elements, use one or more of the following ID-attribute-values on the relevant HTML elements. Alternatively you must trigger the appropriate Cookiebot API-function when the user clicks your element to submit a consent.
Element ID-attribute |
Type |
Description |
CybotCookiebotDialogBodyButtonAccept |
Any |
Submits a consent (opt-in) by triggering Cookiebot.dialog.submitConsent(). |
CybotCookiebotDialogBodyButtonDecline |
Any |
Submits an opt-out by triggering Cookiebot.dialog.submitDecline(). |
CybotCookiebotDialogBodyLevelButtonAccept |
Any |
Submits a consent for the selected cookie categories (opt-in) by triggering Cookiebot.dialog.submitConsent() |
CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll |
Any |
Submits an opt-out by triggering Cookiebot.dialog.submitDecline(). |
CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection |
Any |
Submits a consent for the selected cookie categories (opt-in) by triggering Cookiebot.dialog.submitConsent() |
CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll |
Any |
Submits a full consent (opt-in) by triggering Cookiebot.dialog.submitConsent() |
CybotCookiebotDialogBodyLevelButtonNecessary |
Checkbox |
The value of this checkbox indicates whether the user accepts this type of cookies when submitting a consent. |
CybotCookiebotDialogBodyLevelButtonPreferences |
Checkbox |
The value of this checkbox indicates whether the user accepts this type of cookies when submitting a consent. |
CybotCookiebotDialogBodyLevelButtonStatistics |
Checkbox |
The value of this checkbox indicates whether the user accepts this type of cookies when submitting a consent. |
CybotCookiebotDialogBodyLevelButtonMarketing |
Checkbox |
The value of this checkbox indicates whether the user accepts this type of cookies when submitting a consent. |
Cookiebot SDK
If you prefer, you can use the Cookiebot SDK to have access to Cookiebot methods and properties. The SDK is available here: https://www.cookiebot.com/goto/developer
Comments
1 comment
Don't have coding skills and knowledge of HTML, CSS and Javascript. ? We have developed some custom banner designs you may like. You can further style these cookie banner designs to your look and feel. Have a look at https://cookiemagic.eu/cookiebot-custom-banner-designs/
Please sign in to leave a comment.