Drupal install guide
Add Velo to Drupal
Install the Velo cookie banner and Google Consent Mode v2 on Drupal with one line in your theme template. With admin access to the site, most installs take a few minutes. If you use Google Tag Manager, this page covers that route too.
Instructions and image sources reviewed 23 September 2026.
What you need on Drupal
Before you start
- Where. Custom theme → html.html.twig
- Plan. Theme code access
- Goes live. After a cache flush
- Typical time. About five minutes
Once it is live
- Your banner follows the defaults you set for each visitor’s region.
- Tags wait until the visitor has chosen.
- Every choice is recorded, and Consent Mode v2 passes it on to your Google tags.
Two ways to install Velo on Drupal
Pick the route that matches how your site already loads its tags. Both end with the same banner and the same signals.
Paste one line before the head closes
Add your site’s snippet to the site-wide head, then publish and test it on the live site. If your measurement tags already run through Google Tag Manager, use the route further down instead.
Use Tag Manager? Skip the code
If Google Tag Manager is already on your site, this is the easiest way to add Velo. There’s no code to touch, it takes four short steps, and all your tags stay in one place.
Drupal caches rendered pages heavily, so flush the caches once after the edit. Because the snippet is the same for every visitor, page cache and CDN cache both keep working. Velo works out the visitor’s region and handles their choice in the browser and at the edge, not in Drupal.
Everything a consent setup needs
The same banner, records and scans on every plan. Pro adds unlimited sites, unlimited scans and your own logo.
Your banner asks in the visitor’s language and follows the defaults you set for their region.
Every choice is recorded, and Consent Mode v2 passes it on to your Google tags.
Paste one line before the head closes
Add your site’s snippet to the site-wide head, then publish and test it on the live site. If your measurement tags already run through Google Tag Manager, use the route further down instead.
Copy the line
Copy the complete installation snippet for this site from your Velo dashboard. The example below shows the format; replace your-site-id before using it. Keep the API endpoint supplied by your dashboard.
<script src="https://cdn.veloconsent.com/v1/velo.js" data-api="https://app-staging.veloconsent.com" data-velo-site="your-site-id" async></script>
Add the snippet in your custom theme
In your custom theme’s html.html.twig, paste the complete Velo snippet inside the head, before measurement scripts. Preserve Drupal’s existing head placeholders and markup. Deploy the theme change and rebuild Drupal’s caches. A body block is not a substitute for head placement.
{# In your custom theme’s html.html.twig #}
<head>
{# Paste the complete Velo snippet from your dashboard here. #}
{# Keep the existing head placeholders and theme markup. #}
</head>Publish and check the live site
Save and publish the change using the platform steps above, then clear any site or CDN cache. Open the published URL in a fresh browser session. Check the banner where your region rules require it, test accepting and rejecting, and verify consent defaults and updates before your measurement tags run. Confirm the site appears as installed in your Velo dashboard.
Velo’s banner with its default look. Your banner’s copy, colours and region settings may differ.Use Tag Manager? Skip the code
If Google Tag Manager is already on your site, this is the easiest way to add Velo. There’s no code to touch, it takes four short steps, and all your tags stay in one place.
The complete Tag Manager guideAdd Velo to Tag Manager
Open the Velo template, click Add to workspace, then pick your container. Open the Velo template ↗
Paste your site ID
In Tag Manager, open Tags and click New. Click Tag Configuration, choose Velo CMP and paste your site ID. You’ll find it in your Velo dashboard. Leave everything else as it is.
Make it load first
Click Triggering, choose Consent Initialization – All Pages, then click Save. This lets Velo start before your other tags.
Publish and check it
Click Submit, then Publish. Preview alone doesn’t put Velo live. Then open your site in a private window, try the banner, and check that it shows as installed in your Velo dashboard.
Or hand it to an agent
Copy the prompt into Claude, ChatGPT, Cursor or whichever assistant you already use. It carries everything on this page: both routes, the order the tags have to load in, and the checks that prove it worked.
Install with AIThe prompt
Paste this prompt into your assistant, then provide your site ID and the complete installation snippet or GTM settings from your Velo dashboard.
Install Velo on Drupal. Current guide: https://veloconsent.com/drupal Before editing, get my site ID and complete installation snippet or GTM settings from the Velo dashboard. Confirm which consent tool and measurement tags already run on the site. Choose one installation route: A. If the site already uses Google Tag Manager, add the Velo CMP template (published by veloconsent) from the Community Template Gallery. Set my site ID, theme and API endpoint from the dashboard. Review the advanced options; ads_data_redaction and url_passthrough default to off. Use Consent Initialization – All Pages, then Preview and verify consent before publishing. Full steps: https://veloconsent.com/google-tag-manager B. For direct installation: In your custom theme’s html.html.twig, paste the complete Velo snippet inside the head, before measurement scripts. Preserve Drupal’s existing head placeholders and markup. Deploy the theme change and rebuild Drupal’s caches. A body block is not a substitute for head placement. Preserve unrelated code. Avoid duplicate Velo installs or competing consent defaults. Do not assume a head placement or async loading alone guarantees tag order. Check the published site in a fresh session. Verify the banner under the configured region rules, initial consent defaults, accept/reject updates and the velo_consent_update event. Check that non-Google tags follow their assigned categories. Test a second page and any separate checkout surface. Confirm signals reach the Velo dashboard. Report what changed, where it changed and the result of each check. Describe any missing access or checks you could not complete.
From the journal
Notes on cookie banners, Consent Mode and the data that goes missing between them.
Do Canadian websites need Google Consent Mode v2?
Google Consent Mode v2 in Velo: what is new
How to set up Google Consent Mode v2 on Shopify
Common questions about Velo on Drupal
Which Drupal versions does this cover?
The steps are written for Drupal 10 and 11 and work the same on 9. Velo is one script tag with no module dependency, so core and module updates do not affect it.
Do I need a dedicated module?
No. A custom theme can load the snippet without a dedicated Velo module. If you use a code-injection module instead, make sure it can add the complete script to the head. Disable any overlapping consent tools before you go live.
Will Drupal’s caching break it?
No. The snippet is the same for every visitor, so page cache and CDN cache both keep working. Velo works out the region and handles the consent decision in the visitor’s browser and at the edge, not in Drupal.
Will it slow the site down?
The dashboard snippet loads asynchronously. As with any script, measure its effect on your site and check your tag order; asynchronous loading alone does not guarantee consent defaults run before other tags.
Can an AI assistant do this for me?
Yes. Copy the prompt in Install with agents, just below, into Claude, ChatGPT, Cursor or whichever assistant you already use. It carries the steps on this page, the order the tags have to load in, and the checks the agent has to run before it tells you the job is done.
Free for one site
Banner, scan and consent records for one site, free. Pro from €7 a month, plus VAT, for unlimited sites.