Kentico offers web parts that facilitate quick inclusion of cookie consent functionality to websites.
Kentico cookies are separated into several cookie levels according to their importance in the system. There are three main levels designed to comply with the law regulations.
To display a text message and buttons asking visitors for consent to store cookies in their browsers, use one of the following web parts:
Both web parts are implemented by the ~/CMSWebParts/General/CookieLaw.ascx control. The "simple" variant is a preconfigured version of the Cookie law and tracking consent web part, set up only for the cookie law consent. By default, the web parts are not styled, so you need to update your site's CSS stylesheet to get the required look and feel.
This web part offers three cookie levels to choose from:
On each level, actions to switch to the remaining levels are offered. You may customize the text messages, available actions as well as button texts.
The Default cookie level setting, which can be set in the Settings application under the System category, determines the cookie level that visitors have before making a choice via the web part.
All cookies level required for On-line marketing features to work correctly in Kentico EMS
The On-line marketing features of the Kentico EMS edition only work fully for visitors who have their cookie level set to All cookies. For example, the system does not create contacts for visitors whose allowed cookie level is only System or Essential.
You can either set the Default cookie level setting to Visitor or All, or allow individual visitors to give tracking consent and increase their cookie level. For more information, see Working with consents.
The Compare current cookie level to property is a basis for other settings in the web part. It defines a level to which the user's current cookie level is compared. Three states with their own settings are defined depending on the selected level:
This should give you enough options to configure the web part.
In addition to managing cookie law consents, this web part also allows you to manage consents for tracking of personal data of users. For information about tracking consents, see the Working with consents page.
Kentico EMS required
To utilize all features of the Cookie law and tracking consent web part, namely managing tracking consents, you need the Kentico EMS license edition.
This is a preconfigured version of the previous web part. The preset behavior is: Disable cookies by default, request allowing, and once allowed, hide the web part. To make sure the web part behaves according to the preset behavior, you need to set the Default cookie level setting in the Settings -> System category to System.
Testing cookie law web parts
Cookies are used for both the live site and the Kentico administration interface. When a user signs in to the administration interface, the system automatically allows all cookies in the user's browser. This may prevent users from interacting with cookie web parts on the live site. On the other hand, adjusting the cookie level via a cookie web part on the live site may interfere with the administration interface.
To avoid such issues, we recommend testing any changes of cookie level settings and the related web parts in a different browser or computer, or using a separate anonymous/private/incognito window of your current browser.