Skip to main content
Back to Guides
Compliance5 min readBy Armin Zaribaf

HubSpot CMS Cookie Banner for CCPA/CPRA: 2026 Setup

HubSpot's built-in banner governs HubSpot's own cookies but leaves your ad pixels untouched. Here's how to add a California opt-out on HubSpot CMS that covers every tag, including the HubSpot tracking code.

California doesn't require an opt-in cookie modal. What it does require trips up many HubSpot CMS sites: a working opt-out of the sale and sharing of personal information, tags that actually stop when someone opts out, and automatic handling of the Global Privacy Control browser signal. Under the CPRA amendments, "sharing" means disclosing data for cross-context behavioral advertising even without money changing hands, which is what most ad pixels do the instant they fire. HubSpot adds a complication: its native consent banner controls HubSpot's own tracking code, but it doesn't touch the LinkedIn, Meta or Google tags you've placed in templates or the site header.

CCPA/CPRA requirements and where they live on HubSpot CMS
RequirementWhat California expectsOn HubSpot CMS
Opt-out link"Do Not Sell or Share My Personal Information", or the alternative "Your Privacy Choices" link, on every pageA footer link in the global footer module, plus the consent tool's persistent link
Opt-out preference signalsTreat Global Privacy Control as a valid opt-out request, no extra clickHandled by the consent tool before tags fire
Sensitive dataA "Limit the Use of My Sensitive Personal Information" link if you use sensitive data beyond the permitted purposesApplies if forms collect health, financial or location data
MinorsOpt-in before selling or sharing data of consumers you know are under 16Form and CRM logic; a banner can't infer age
Re-askingWait at least 12 months before asking someone who opted out to opt back inA consent-tool setting

HubSpot's banner versus your other tags

HubSpot's native consent banner, found under Settings › Privacy & Consent, controls whether the HubSpot tracking code sets its cookies. It doesn't block third-party scripts you've added to the site header or templates. Running it alongside a separate consent tool shows visitors two banners. If you use CookieBeam, turn HubSpot's banner off and let CookieBeam signal HubSpot instead. The native banner options are described in cookie consent on HubSpot.

Set up CookieBeam for California visitors

1

Publish your banner first

Build the banner in CookieBeam, set up your categories, and publish it to production so the loader has a configuration to serve. The quickstart walks through this.

2

Add the loader to the site header HTML

Paste the production loader as the first line of the site header HTML under Settings › Website › Pages, or at the top of your base template's head. It has to come before any other script. Don't add async or defer. See install with a script tag.

3

Apply the CCPA/CPRA preset

On the banner's Regional settings page, add a rule from the CCPA/CPRA framework preset. It targets California visitors with an opt-out banner in a bar inline layout at the bottom center of the page, with a preferences button that reads "Do Not Sell or Share My Personal Information" and opens the US opt-out panel. Enable the rule's Do-Not-Sell link option so a persistent link remains available after the first visit. If you serve visitors in other states with privacy laws, add the US Opt-Out States preset too. See regional rules.

4

Mark the tags that sell or share

Ad pixels and data-sharing tags go in the marketing category. Hardcoded scripts need inert markup (type="text/plain" with data-category) so CookieBeam can control them; see script blocking. In opt-out mode, these tags run by default and stop being activated once the visitor opts out.

5

Keep Consent Mode on

Turn on Google Consent Mode in the banner settings. It updates Google tags directly, and it's also the event that CookieBeam's vendor consent bridges listen to.

6

Leave the HubSpot bridge on

Under Vendor Consent Signals, the HubSpot bridge is on by default. It pushes HubSpot's doNotTrack instruction based on the analytics consent state. Under a US opt-out rule, analytics starts granted, so HubSpot tracking continues until the visitor's choices remove analytics or a respected GPC signal strips it. If counsel treats your HubSpot data as shared for advertising, assign it the sale or sharing purpose under Consent → Purposes. See the HubSpot integration.

7

Save, publish and test

Hit Save Settings, then Publish. Rule changes don't reach visitors until you publish. Then run the California test below.

Site header HTML
<!-- HubSpot: Site header HTML, first line -->
<script
  id="CookieBeam"
  src="https://cdn.cookiebeam.com/banner/PUBLIC_BANNER_ID/default/loader.js"
  type="text/javascript"
></script>

Test your HubSpot site like a California visitor

  1. Open the site in a clean browser profile from California, or use a geo-simulated preview, and confirm the opt-out banner appears.
  2. Opt out of sale and sharing, reload the page, and check the Network tab. Advertising pixels shouldn't load.
  3. In a GPC-enabled browser, confirm navigator.globalPrivacyControl is true, load the site fresh, and verify that advertising tags never fire without any click.
  4. Confirm the Do-Not-Sell link is still reachable after the first choice.
  5. After a GPC visit, check that window._hsq contains a doNotTrack entry and that the hubspotutk cookie isn't set.

The cookie banner QA checklist covers the same checks for EU and UK visitors.

Frequently Asked Questions

Does HubSpot's cookie banner handle CCPA?

It controls the HubSpot tracking code's cookies, but third-party ad pixels in your templates need a consent tool that stops them after an opt-out and handles GPC.

Is HubSpot tracking a sale or sharing under the CCPA?

That depends on how HubSpot processes the data under your contract and whether you use it for cross-context behavioral advertising. Many businesses treat HubSpot as a service provider. Ask counsel about your specific setup.

Where does the consent script go on HubSpot CMS?

First in the site header HTML or the head of your base template, synchronous, before every other script.

Should I keep HubSpot's banner if I use another consent tool?

Generally not. Two banners confuse visitors and can record conflicting choices. Use one tool and have it signal HubSpot through its bridge.

Cookie consent on HubSpot covers the native banner's policy types and the EU side. For the law itself, see how to build a compliant Do Not Sell or Share link, Global Privacy Control explained and CPRA enforcement in 2025-2026. If you serve other states too, the US state privacy cookie banner checklist maps them all.

Primary sources: California Attorney General CCPA page, the California Privacy Protection Agency (regulations and enforcement decisions), and the Global Privacy Control specification.

This page summarizes the law as we understand it in October 2026 for website and cookie decisions. It isn't legal advice. Statutes, regulations and attorney general guidance change, so confirm the current text with counsel before relying on any threshold or date here.

7 min read

GPP, MSPA & US State Signals: A Publisher's Guide

The US Privacy String you built for CCPA was deprecated in January 2024. GPP, the US National string, and the MSPA replaced it, and getting the signal wrong can be a misrepresentation. Here's how the new US privacy signals move through the ad stack.

5 min read

Building a TCF CMP That Passes IAB Validation

What it takes for a Consent Management Platform to pass IAB Europe's TCF checks: a registered CMP ID, a cleanly decodable TC String, event-listener delivery, and encoding against the right GVL version.

9 min read

How to Migrate Your CMP Without Losing Existing Consent Records

A step-by-step technical guide to switching consent management platforms without losing consent records, triggering mass re-consent, or breaking Consent Mode. Covers export, category mapping, parallel runs, and zero-downtime migration patterns.