Cookie consent banner at the bottom of a page with Accept, Reject and Manage cookies buttons and a Privacy policy link
Arabic right-to-left cookie consent banner with accept, reject and manage buttons

This project is not covered by Drupal’s security advisory policy.

iDigit Gov consent shows a consent banner with equal-weight Accept and Reject buttons, plus Manage cookies, which opens inline in the banner. Scripts you register (HTTPS URLs, per category) are inserted only after their category is granted; rejecting never loads them.

It is a community contribution by iDigit. It is not an official DGA product and is not endorsed by DGA. It is not legal advice and makes no claim of compliance with any law.

What it does

  • Banner with Accept, Reject, and Manage cookies, which opens inline in the banner (no modal, no focus trap).
  • Registered scripts load only after their category is granted.
  • The choice is stored in a first-party cookie (idg_consent, 180 days by default); nothing is stored on the server.
  • Bump the consent version to ask everyone again; a small JavaScript API is provided.
  • Arabic translation included.

Limits

Without JavaScript, the banner is hidden and no registered script loads. Rejection cannot delete cookies that third parties already set: remove or block those scripts yourself.

Related projects

Drupal.org has several mature consent projects, for example Klaro, COOKiES and EU Cookie Compliance. This module is deliberately small and has no external library; choose the one that fits your requirements.

Requirements

Drupal core ^11.3 (tested for 1.0.0-beta1 on 11.3.21, 11.4.11 and 11.4.12 with PHP 8.3 and 8.4, and on 11.5.0-beta1, beta only). No other dependencies.

Install

composer require 'drupal/idigit_gov_consent:^1.0@beta', then enable the module and configure categories and scripts.

Supporting organizations: 
funded the development and ongoing maintenance, released as a community contribution

Project information

Releases