If your website runs on HubSpot, you already have one of the most powerful inbound marketing platforms available — but that power comes with a privacy compliance responsibility. HubSpot loads tracking, analytics, and personalization cookies by default, and under the GDPR, placing those cookies without prior user consent can expose your organisation to significant fines.
Many HubSpot users assume the platform's built-in cookie notification handles this. It doesn't. HubSpot's native banner is a notification, not a consent gate — it doesn't block non-essential cookies before consent is given, doesn't maintain a granular audit log, and doesn't meet the legal standard required by GDPR or ePrivacy. Free generic scripts often have the same gap, and coding a compliant solution from scratch requires ongoing maintenance every time HubSpot updates its cookie behaviour.
Secure Privacy is a dedicated cookie consent management platform built specifically to close this gap. It integrates with HubSpot in under 10 minutes — no developer required — and handles prior blocking, consent categorisation, audit logging, and multi-language banners automatically.
By the end of this guide you will have a fully GDPR-compliant cookie consent banner live on your HubSpot website, with documented consent records and visitor-facing preference controls that satisfy EU and international privacy law.
In this guide:
Who Is This For?
This guide is for:
HubSpot website owners and marketers who need to add a GDPR-compliant cookie consent banner without touching code.
Web and marketing agencies managing HubSpot sites on behalf of EU-facing clients.
Compliance and legal teams verifying that their HubSpot property meets GDPR and ePrivacy Directive requirements.
Prerequisites
An active HubSpot account with permission to edit website settings.
A Secure Privacy account with at least one domain configured.
Your Secure Privacy installation script (available during onboarding or under Domains → Installation in your Secure Privacy dashboard).
GDPR Cookie Consent Requirements for HubSpot Websites
Obtaining proper cookie consent is a fundamental legal requirement under the GDPR and the ePrivacy Directive. To be legally valid, cookie consent collected on your HubSpot website must be:
Obtained before cookies are set — Consent must be captured before any non-essential cookies are placed on the visitor's browser. Strictly necessary cookies are exempt from this rule.
Informed and specific — Visitors must receive clear, specific information about what they are consenting to before consent is recorded — vague or bundled consent is not valid.
Withdrawable — Visitors must be able to access their cookie preferences at any time and change or withdraw consent as easily as they originally gave it.
Documented — Proof of consent must be recorded and stored, including the date, time, and nature of each visitor's decision, so it can be produced in the event of an audit.
Installing Secure Privacy on Your HubSpot Website
Follow these five steps to add the Secure Privacy cookie consent banner script to your HubSpot website. The process takes approximately 5–10 minutes and requires no coding.
Step 1 — Get Your Secure Privacy Installation Script
Obtain your Secure Privacy installation script. You can find it during the Secure Privacy onboarding walkthrough or in your account under Domains → Installation. Copy the full script to your clipboard.
Step 2 — Log In to HubSpot and Open Settings
Log in to your HubSpot account and navigate to Settings (the gear icon in the top navigation bar).
Step 3 — Paste the Script into the Head HTML Field
In the left sidebar, scroll to the Advanced section. Locate Additional code snippets and paste your Secure Privacy script into the Head HTML field.

HubSpot Settings → Advanced → Additional code snippets — paste the Secure Privacy script into the Head HTML field.
Step 4 — Confirm Auto-Save
Your changes will be saved automatically — there is no separate save button required in this section of HubSpot settings.
Step 5 — Publish Your Website
Publish your HubSpot website to make the Secure Privacy cookie consent banner live for all visitors. Once published, the banner will appear on page load and begin blocking non-essential cookies until consent is given.
After Installation — What to Expect
Once the script is live, Secure Privacy will automatically:
Scan your HubSpot pages for cookies and trackers.
Display a consent banner to new visitors before any non-essential cookies are set.
Record and store timestamped consent logs for audit purposes.
Provide returning visitors with a preference centre to update or withdraw consent at any time.
To verify the installation, open your HubSpot website in a private/incognito browser window — the Secure Privacy cookie consent banner should appear immediately on page load.
Troubleshooting
HubSpot's Essential Cookies
HubSpot injects certain cookies into its web pages that are required for core website functionality. These cookies cannot be blocked by any consent management solution. To handle them correctly, assign them to the Essential category inside the Secure Privacy admin dashboard — this exempts them from the consent requirement in line with GDPR's strictly necessary cookie exception.
Banner Not Appearing After Publishing
If the cookie consent banner does not appear after you publish, check the following:
Confirm the script is pasted in the Head HTML field (not Footer HTML).
Ensure the correct domain is configured and active in your Secure Privacy account under Domains → Installation.
Clear your browser cache and test in a private/incognito window, as your own consent may have already been recorded.
Frequently Asked Questions
Does my HubSpot website need a cookie consent banner?
Yes — if your HubSpot website is accessible to visitors in the EU or other regions covered by privacy law (GDPR, ePrivacy, CCPA, etc.), you are legally required to obtain valid cookie consent before placing non-essential cookies. HubSpot itself sets several tracking and analytics cookies that fall outside the "strictly necessary" exemption and therefore require explicit user consent.
Is HubSpot's built-in cookie banner GDPR compliant?
HubSpot includes a basic cookie notification, but it does not meet all GDPR requirements — particularly prior blocking of non-essential cookies, granular consent categories, and auditable consent logs. A dedicated consent management platform like Secure Privacy is required to fully satisfy GDPR and ePrivacy obligations.
How do I add a GDPR cookie banner to HubSpot?
The fastest method is to paste a cookie consent script into the Head HTML field inside HubSpot's Settings → Advanced → Additional code snippets. Secure Privacy provides this script during onboarding, and the full installation takes under 10 minutes with no coding required.
Will Secure Privacy block HubSpot's essential cookies?
No. HubSpot injects certain cookies that are required for core website functionality and cannot be blocked. You can manage these correctly by assigning them to the Essential category inside the Secure Privacy admin dashboard, which exempts them from the consent requirement in line with GDPR rules.
Do I need a developer to install Secure Privacy on HubSpot?
No. The entire installation is a copy-and-paste action inside HubSpot account settings. It takes approximately 5–10 minutes and requires no coding knowledge or developer access.