Secure Privacy

How to Install the Secure Privacy Cookie Consent Script on Your Website

Getting your website GDPR- and CCPA-compliant doesn't have to be complicated. This step-by-step guide shows you how to install the Secure Privacy cookie consent script on any domain — manually, via your CMS, or through a developer handoff — in minutes.

SPT
Secure Privacy Team
6 min read ()

Under GDPR, CCPA, and similar privacy laws, every website that drops cookies or tracks visitors must display a cookie consent banner — and collect proof of that consent. Failing to do so can mean hefty fines and damaged user trust.

Many site owners try to solve this with free WordPress plugins or hand-coded banners, only to discover they expire, break on updates, lack an audit trail, or don't cover regulations beyond GDPR. A proper consent management platform (CMP) handles all of that automatically.

Secure Privacy is a fully automated CMP that scans your site for cookies, generates a compliant consent banner, and keeps your records up to date as laws change — with no ongoing manual work. The single lightweight script you'll install in this guide is all it takes to activate everything.

By the end of this article you will have:

  • Located your unique Secure Privacy installation script

  • Added it to your website — manually, via your CMS, or through a developer

  • Verified the script is live and working correctly

Who Is This Guide For?

This article is for anyone who needs to add GDPR or CCPA cookie consent to their website using Secure Privacy, including:

  • Website owners and marketers who want to self-install without coding knowledge

  • Developers who have been asked to add the consent script on behalf of a client

  • Agencies managing multiple client domains from a single Secure Privacy dashboard

Prerequisites

  • An active Secure Privacy accountstart a free trial if you don't have one yet

  • The domain you want to protect must already be added inside your Secure Privacy dashboard

  • Ability to edit the <head> section of your website (or access to a developer who can)

Installing Your Secure Privacy Script: Step-by-Step

Each domain in Secure Privacy gets its own unique script. Here is how to locate yours:

  1. Log in to your Secure Privacy account.

  2. Navigate to the "Domains" section in the main menu.

  3. Locate or search for the domain you want to add cookie consent to.

Secure Privacy dashboard — Domains section listing all added domains, ready to select for cookie consent script installation

Select the domain you want to install the cookie consent script on.

  1. Click on the domain name to open its settings.

  2. Select the "Installation" tab from the left-side menu.

Secure Privacy domain settings with the Installation tab highlighted in the left navigation menu

Open the Installation tab to access your unique cookie consent script.

  1. Copy the installation script code displayed on the page.

  2. Paste the script into your website's <head> section, placing it immediately after the opening <head> tag for optimal performance and consent capture.

If you are not comfortable editing HTML directly, skip to Step 2a (CMS-specific guide) or Step 2b (email your developer).

Step 2a — Use a Platform-Specific CMS Installation Guide

If your website runs on a popular CMS or tag management platform, Secure Privacy provides dedicated cookie consent installation guides for each. Supported platforms include:

Secure Privacy Installation tab showing a CMS platform dropdown for platform-specific cookie consent setup on WordPress, Shopify, and more

Select your CMS from the dropdown to access a tailored installation guide.

  • WordPress

  • Shopify

  • Squarespace

  • HubSpot

  • Weebly

  • Joomla

  • Magento

  • Drupal

  • Google Tag Manager

  • Adobe Tag Manager

Select your CMS or platform from the dropdown menu in the Installation tab to access step-by-step instructions tailored to your specific setup.

If you prefer to have a developer handle the installation, you can send the script directly from your Secure Privacy dashboard — no copy-pasting required:

  1. Log in and click on the relevant domain name.

  2. In the "Installation" tab, click the "Email Script" button.

  3. Enter your developer's email address and click "Share Script" to send the installation code.

  4. Ask your developer to place the script immediately after the opening <head> tag on every page of your website for full cookie consent coverage.

Secure Privacy Email Script dialog — enter a developer's email address to share the cookie consent installation script directly

Share the script with a developer in one click from the Installation tab.

Once the script has been added to your website, confirm it is installed correctly before going live:

  1. Return to the "Installation" tab for your domain in the Secure Privacy dashboard.

  2. Click the "Test Installation" button.

Secure Privacy Test Installation button on the domain Installation tab — click to verify the cookie consent script is correctly placed and active

Use the Test Installation button to confirm your cookie consent script is live.

  1. The system will automatically verify whether the script is correctly installed:

    • Success: You will see a confirmation message confirming the cookie consent script is correctly installed and active.

    • Error: You will receive a notification describing the issue. Review your installation to ensure the correct script is placed in the right location for your domain.

Troubleshooting: Script Not Detected?

If the Test Installation check returns an error, run through this quick checklist:

  • Wrong domain selected: Confirm the script you copied belongs to the exact domain (including subdomain) you installed it on.

  • Script not in <head>: The script must be placed inside the <head> element, not in <body> or a footer.

  • Caching: If your site uses a caching plugin or CDN, clear the cache and re-run the test.

  • Tag manager firing rule: If you installed via Google Tag Manager or Adobe Tag Manager, verify the tag is set to fire on All Pages.

  • Script blocked: Check that no Content Security Policy (CSP) header is blocking the Secure Privacy script domain.

If the problem persists, contact the Secure Privacy support team at [email protected] with a screenshot of the error message and your domain URL.

What Happens After Installation?

With the script live, Secure Privacy begins automatically scanning your site for cookies and trackers. Within a short time you will see:

  • A cookie consent banner displayed to your visitors, styled to match your branding

  • An automatically generated cookie policy page linked from your banner

  • Consent records stored in your dashboard for audit and compliance purposes

  • Ongoing rescanning as your site changes, keeping your cookie disclosure up to date

Frequently Asked Questions

Yes, in most cases. GDPR (EU/EEA), UK GDPR, CCPA (California), and many other privacy laws require websites to inform users about cookies and, for non-essential cookies, obtain their consent before setting them. Failing to comply can result in significant fines and reputational damage. A consent management platform like Secure Privacy automates this process for you.

The script must be placed immediately after the opening <head> tag on every page of your website. Placing it early in <head> ensures the consent banner loads before any tracking scripts fire, which is a core requirement for GDPR compliance.

Can I install Secure Privacy without touching my website's code?

Yes. You can install the Secure Privacy cookie consent script through Google Tag Manager or Adobe Tag Manager without editing your site's HTML directly. Alternatively, you can use the "Email Script" feature in your dashboard to send the script straight to your developer.

Does Secure Privacy work with WordPress, Shopify, and other CMS platforms?

Yes. Secure Privacy offers dedicated cookie consent installation guides for WordPress, Shopify, Squarespace, HubSpot, Joomla, Magento, Drupal, Weebly, Google Tag Manager, and Adobe Tag Manager. Select your platform from the dropdown in the Installation tab of your dashboard for tailored instructions.

How do I check if my Secure Privacy script is installed correctly?

After adding the script to your site, go to the Installation tab for your domain in your Secure Privacy dashboard and click "Test Installation." The system will automatically check whether the script is live and report success or provide details about any issues found.

Need more help?

Our privacy experts are here to guide you through complex regulations and find the right solution.

Contact Support

Related Articles

View all