CMS · Install guide
Cookie consent for Drupal
Updated
In Drupal, the banner script belongs in your theme as an external library loaded in the header, so it runs before other scripts.
- Setup time
- About 5 minutes
- Coding
- None: copy and paste
- Laws covered
- GDPR, UK GDPR, CCPA, DPDP
- Google Consent Mode v2
- Built in, basic or advanced
Set up cookie consent on Drupal in 3 steps
- Create a free accountAdd your website. Kiescy scans it and finds the trackers that need consent.
- Paste one script into DrupalYour banner appears and starts holding back trackers until visitors choose.
- Check it worksOpen your site in a private window and run the free check to confirm nothing loads early.
Why Drupal sites need cookie consent
Drupal runs many public-sector, university and enterprise sites, often with strict compliance reviews. Regulators and auditors look for consent before analytics and a record of each choice.
Your options on Drupal
| Approach | Good for | Watch out for |
|---|---|---|
| EU Cookie Compliance module | Sites that want everything in Drupal config | Rules and records are configured per site; regional behavior is limited |
| Kiescy as a theme library | Multi-site and multi-region setups | Theme-level change; deploy with your code |
Add your privacy policy
Create a Basic page with the Full HTML text format and paste the embed, then add it to the footer menu.
<div data-kiescy-doc="privacy"></div>
<script src="https://script.kiescy.com/embed/policy/YOUR_SITE_KEY.js" async></script>Check that it works
Open your site in a private window: the banner should appear for a first-time visitor. Then run the free privacy check, which opens your site as a new EU visitor and lists anything that still loads before consent.
Kiescy's monitoring repeats that check on a schedule and emails you if a new script starts tracking before consent.
What your Drupal visitors see
Kiescy detects where each visitor is and shows the version their law requires, so you don't have to choose between the strictest banner for everyone and no banner at all.
Trackers Drupal sites usually load
These are the tools that most often need consent on Drupal sites, and how Kiescy treats them. Run a cookie scan to see exactly what yours loads.
| Tool | Category | What happens |
|---|---|---|
| Google Analytics / Google Tag modules | Analytics | Held back once your scan finds them |
| Embedded media (oEmbed YouTube) | Social | Iframes need a click-to-load approach |
| Search and feedback widgets | Performance | Check what they load |
Google Consent Mode v2 on Drupal
With header: true, Kiescy loads before Google Tag module scripts, so Consent Mode v2 defaults exist when gtag.js starts.
New to Consent Mode? Read basic vs advanced Consent Mode v2.
Troubleshooting
The script loads in the footer
Check header: true on the library and clear caches. JS aggregation keeps external libraries external.
BigPipe or caching shows the banner late
The banner runs in the browser, so page caching doesn't affect its logic; make sure the library loads in the header, not via a lazily rendered block.
Compliance checklist for Drupal
- A consent banner that blocks non-essential trackers until the visitor agrees (opt-in for the EU, UK and India).
- A "Do Not Sell or Share" option for California visitors, and Global Privacy Control honored.
- A privacy policy that names the tools above, linked from every page.
- A cookie policy listing the cookies your scan finds.
- A way for people to request, correct or delete their data.
- Records of each consent choice, kept as proof.
- Privacy policy linked in the footer menu and on user registration.
Guides for Drupal site owners
Questions
Does it work with Drupal 7?
Yes, via drupal_add_js in your theme, but Drupal 7 is end-of-life.
Can I use it across a Drupal multisite?
Yes. Add a website per domain in Kiescy and use each site's key, or one theme library with a per-site key setting.
Official Drupal documentation
Menus move. If a step above doesn't match what you see, Drupal's own docs show the current way to add code.
Get compliant this afternoon, not this quarter.
Set up your policies, banner and request form in one place. Free while Kiescy is in early access.