Cookiebot

Cookiebot (ODC)

Stable version 0.1.1 (Compatible with ODC)
Uploaded on 22 July 2024 by Moxie Lead, Lda
Cookiebot

Cookiebot (ODC)

Documentation
0.1.1

Installation

Install the component directly from the forge or via service studio.


Configuration

Create your account at Cookiebot.com, they provide several tiers including a free tear for 1 domain.

Go to “Settings” and “Dialog” and choose your cookie consent banner. The default banner is configured with the strictest settings possible (suitable for cookie consent under GDPR and ePR).

Under “Settings” and “Content”, edit the default banner text so it fits your website and legal requirements.

Go to “Settings” and “Your scripts” and copy the data-cbid string without the quotes.

It look like this: 00000000-0000-0000-0000-000000000000


Usage

On your application:

  • Create a site property and paste the cbid.
  • Create Server action Cookiebot_DomainGroupID

  • Create client variable

  • Reference the public web block and methods from the cookie bot library.
  • Create an OnApplicationReady client action and use the Initialize method form the library with the content of the site property




You're done!


Properties

The method Properties_Read returns the Cookiebot current properties for the current session, all properties are read only:

  • consent.necessary, True if current user has accepted necessary cookies.
  • consent.preferences, True if current user has accepted preference cookies.
  • consent.statistics, True if current user has accepted statistics cookies.
  • consent.marketing, True if current user has accepted marketing cookies.
  • consented, True if the user has accepted cookies.
  • declined, True if the user has declined the use of cookies.
  • hasResponse, True if the user has responded to the dialog with either 'accept' or 'decline'.
  • doNotTrack, True if the user has enabled the web browser's 'Do not track' (DNT) setting.
    • If DNT is enabled Cookiebot will not set the third party cookie CookieConsentBulkTicket used for bulk consent.
  • regulations.gdprApplies, Allows you to determine if GDPR applies based on the user's geo-location.
  • regulations.ccpaApplies, Allows you to determine if CCPA applies based on the user's geo-location.
  • regulations.lgpdApplies, Allows you to determine if LGPD applies based on the user's geo-location.


Methods

Several methods allow you to interact with the consent dialog box.

  • show - Forces the cookie consent dialog to show.
  • hide - Forces the cookie consent dialog to hide.
  • renew - Shows the cookie consent dialog to the website user to renew or change the user's consent state.
  • runScripts - Evaluates all loaded script tags of type "text/plain" with the attribute "data-cookieconsent" and executes the scripts in accordance with the user's consent state. For use by websites that load content dynamically, e.g. in single page applications. Scripts are only executed once, so this function is safe to call several times, e.g. every time new content is loaded.
  • withdraw - Withdraw my consent for this website.
  • submitCustomConsent- Submit consent through javascript. This can be useful if you wish to use a custom banner.
    • optinPreferences,
    • optinStatistics,
    • optinMarketing


Events

The consent dialog box generates several events that you can use to monitor the user interactions with it.

  • CookiebotOnLoad - The event is triggered when the user's consent has been loaded - either when the user submits consent or when the user navigates to a page where consent has already been submitted.
  • CookiebotOnAccept - The event is triggered if the user accepts the use of cookies. The event is also triggered if the user has consented at an earlier visit to the website.
  • CookiebotOnDecline - The event is triggered if the user declines the use of cookies by clicking the decline-button in the cookie consent dialog. The event is also triggered if the user already has declined at an earlier visit to the website.
  • CookiebotOnDialogInit - Fires when the cookie consent banner is initialized, before compiling the content of the banner.
  • CookiebotOnDialogDisplay - Fires when the cookie consent banner is displayed to the end user.
  • CookiebotOnTagsExecuted - Fires when tags marked up for prior consent (e.g. the attribute "data-cookieconsent") have been triggered.