# Install Secure Privacy on Drupal | Cookie Consent Guide

> [CMP v1] Learn how to install Secure Privacy on your Drupal website using the Header and Footer Scripts module with easy-to-follow steps and screenshots.

- Canonical: https://support.secureprivacy.ai/article/cmp-v1-secure-privacy-installation-guide-for-drupal--stepbystep
- Product: Consent Management
- Category: Integrations
- Published: 2026-03-06T07:13:00+00:00
- Updated: 2026-03-26T21:32:27.99+00:00
- Reading time: 2 minutes

---

Drupal is a powerful open-source digital experience management system used by over 1 million contributors worldwide to deliver personalized web content at scale. This guide explains how to install the Secure Privacy cookie consent script on a Drupal 8 or 9 website using the Header and Footer Scripts module.

**Before you begin:** You will need your unique Secure Privacy installation script. Log in to your Secure Privacy account at [secureprivacy.ai](https://secureprivacy.ai/) and copy the script from the **Domains → Installation** page.

## Who Is This Guide For?

-   Website administrators managing Drupal 8.x or 9.x websites
    
-   Developers integrating Secure Privacy with a Drupal-powered website
    

**In this guide:**

-   [Step 1: Install the Header and Footer Scripts Module](#step-1-install-module)
    
-   [Step 2: Add the Secure Privacy Script via the Module](#step-2-add-script)
    
-   [Common Issues and Fixes](#common-issues)
    
-   [See Also](#see-also)
    

## Step 1: Install the Header and Footer Scripts Module in Drupal

The Secure Privacy integration for Drupal 8/9 uses the **Header and Footer Scripts** module. Download it here: [Header and Footer Scripts Drupal Module](https://www.drupal.org/project/header_and_footer_scripts).

If you are already experienced with installing Drupal modules, skip directly to [Step 2](#step-2-add-script).

### Download the Module

1.  Navigate to the **"Downloads"** section on the module page.
    
2.  Copy the URL for the latest Drupal release. It will look similar to:  
    [https://ftp.drupal.org/files/projects/header\_and\_footer\_scripts-3.0.0.tar.gz](https://ftp.drupal.org/files/projects/header_and_footer_scripts-3.0.0.tar.gz)
    

![Drupal.org Header and Footer Scripts module page showing the Downloads section with the latest release link to copy](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/cc1914e12cf7e4298ddf-1192c63c187b.webp)

### Install and Enable the Module in Drupal 8/9

1.  In your Drupal admin dashboard, navigate to **Manage → Extend** and click **"Add new module."**
    
2.  Paste the copied module URL into the **"Install from a URL"** field and click **"Continue."**
    

![Drupal Extend page showing the Add new module option and the Install from a URL field for the Header and Footer Scripts module](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/2f6b0c9984d2016abdb7-6ce47ab31b0d.webp)

3.  Once uploaded, locate **"Header and Footer Scripts"** in the Extend module list.
    

![Drupal Extend module list showing the Header and Footer Scripts module ready to be enabled](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/377999570fd4f802f516-c71cfe6c290d.webp)

4.  Check the checkbox next to **"Header and Footer Scripts"** and click **"Install"** to enable the module.
    

![Drupal Extend page with the Header and Footer Scripts module checkbox selected and the Install button highlighted](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/f1e4105fff50cc456fb6-61e5b61992e4.webp)

## Step 2: Add the Secure Privacy Script Using the Header and Footer Scripts Module

1.  In your Drupal admin dashboard, navigate to **Configuration → Header and Footer Scripts**.
    
2.  Paste your **Secure Privacy installation script** into the **"Header Scripts"** field to ensure it loads before any non-essential cookies are set.
    

![Drupal Header and Footer Scripts configuration page showing the Header Scripts field where the Secure Privacy script should be pasted](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/a2fb24732c465377a5b4-c0990206c86f.webp)

3.  Click **"Save configuration"** to apply the changes.
    

![Drupal Header and Footer Scripts page with the Secure Privacy script entered and the Save configuration button ready to be clicked](https://pub-7bd19505838640d0a08ef1bd6ec3fb9b.r2.dev/articles/e183e8eb860b83b4db63-1adda2b69be6.webp)

The Secure Privacy cookie consent script is now installed on your Drupal website. Your site is ready to manage user consent and GDPR compliance via Secure Privacy.

## Common Issues and Fixes

**Where do I find my Secure Privacy installation code?**

Log in to your Secure Privacy account and navigate to **Domains → Installation**. Your unique script code is displayed and available to copy from this page.

**I don't see "Header and Footer Scripts" in Drupal's Extend menu.**

Ensure you uploaded the module correctly using the **"Add new module"** option and the latest module URL from Drupal.org. After uploading, the module must be enabled by checking its checkbox in the Extend list and clicking **"Install."**

**My Secure Privacy consent banner is not showing after installation.**

Clear your Drupal cache and refresh your website. Also confirm the script is correctly pasted in the **"Header Scripts"** field under Configuration → Header and Footer Scripts — not the Footer Scripts field.

## See Also

-   [Using Secure Privacy With Drupal](https://support.secureprivacy.ai/article/cmp-v1-increase-compliance-score-with-secure-privacy-cmp)
    
-   [Using Secure Privacy with Drupal (Module Approach)](https://support.secureprivacy.ai/article/how-to-install-secure-privacy-on-drupal)
    
-   [How to Add Custom CSS for Improved Design and Branding](https://support.secureprivacy.ai/article/add-custom-css-for-branding--secureprivacy-guide)
    
-   [Create and Customize Privacy Policies](https://support.secureprivacy.ai/article/mastering-policies-page-for-effective-policy-management)
