Cookie compliance integration for Drupal 8

Cookie compliance integration for Drupal 8

Written by NelsonLast update 1 month ago

To install the CookieScript cookie banner code on Drupal 8, perform the following steps:

  1. Go to your account > Settings > Installation.

  2. Configure geo-targeting (if needed).

  3. Download the CookieScript js file from the Installation section. If you need, read more about self-hosting of js files.

  4. Open your Drupal asset library's theme-name.libraries.yml file in your theme folder.

  5. Under js: line, paste the CookieScript file location (file path) as shown below, where your-cookie-script-hash-number.js is your downloaded CookieScript js file.

    # theme-name.libraries.yml 
     version: 1.x 
     version: 1.x 
     js/your-cookie-script-hash-number.js: {}

CookieScript is installed on Drupal 8 now and should be ready for use.

Did this answer your question?