Implementing CookieYes on Drupal

CookieYes helps you easily display a cookie banner on your Drupal website and manage user consent.

All you need to do is to add the CookieYes code to your Drupal website. After adding the code to the website you will be able to manage consent and block cookies before user consent from the CookieYes dashboard.

Follow the steps to set up CookieYes on your Drupal website.

Copy Installation Code

The first step in the set up is to copy the installation code available at the time of CookieYes registration.

You can copy the code from the dashboard from your Settings page as well. Go to the Settings page, and click on the Get Script button for the corresponding website. A popup with the CookieYes script will appear for you to copy.

After you have copied the code on your clipboard, next you need to add the code in your Drupal website source code.

Add Code in Drupal Using CookieYes Module

Login to the admin side of your Drupal website.

Then visit your Drupal website and go to Site Admin.


CookieYes code can also be added using the Cookie Consent Notice module. To do that, install the extension in your Drupal website.

From the admin side, go to Extend and search for Cookie Consent Notice module by CookieYes. Install the module and go to Configuration.

Installing CookieYes module on Drupal

From the Configuration page, find and click on the module. Add the CookieYes code in the GDPR Script section and click on Save Configuration.

Add CookieYes scripts using Cookie Consent module in Drupal

The cookie banner will now be visible on the user-end of the website.

The Enable CookieYes checkbox will allow you to enable or disable the cookie banner from admin side without removing the code.

Note: While copying the code, remove the commented lines on the copied code (commented line to indicate the start and end of the CookieYes code). The commented lines are HTML encoded in Drupal and the CookieYes banner will not be displayed as a result.

After you have added the banner on your Drupal website, the next step is to configure your banner to accept and manage consent. You can read more about it in CookieYes setup guide.

For any issue related to the implementation of CookieYes, please contact our support team.