Since the GDPR the base module eu_cookie_compliance is dealing with preemptive cookie blocking in a more integrated fashion.
Using this module may make sense until all the issues in eu_cookie_compliance opt-in will be addressed.
Another feature that may be still of used which is not included in eu_cookie_compliance is the possibility to opt in not only javascript or cookies but also related blocks or fields which may behave in undesired way without related js and cookies.

This module extends EU Cookie Compliance module to be compliant with the Italian
law, which requires the preemptive blocking of cookies when the user has not
still accepted the conditions.

How it works

This module adopts a lightweight fully server-side approach to exclude
Javascript files, blocks and node fields from any rendered page until the cookie policy has
been accepted.

Installation

1. Install and configure EU Cookie Compliance so that the popup is enabled
and viewable..
See https://www.drupal.org/project/eu_cookie_compliance.

2. Install IT Cookie Compliance.

3. Go to the admin/config/system/it-cookie-compliance page to configure the
javascript, blocks and fields to exclude before the acceptance.

Supporting organizations: 

Project information

Releases