GDPRChecker

Home / Knowledge Base / HubSpot CMS How to Audit Cookies and Scripts: A Practical Compliance Guide

Website Compliance

HubSpot CMS How to Audit Cookies and Scripts: A Practical Compliance Guide

A practical guide for HubSpot CMS users on auditing cookies and scripts for GDPR compliance. Covers inventory creation, consent defaults, pre-consent request inspection, tag manager triggers, reject flow testing, and disclosure cross-checking. Includes common mistakes, a validation workflow with GDPRChecker scanner, an implementation checklist, and FAQ.

Run a free GDPR compliance scanPreview the findings before choosing a CMP.

Author

GDPRChecker Editorial Team

Reviewed by

Privacy & Compliance Research Team

Last updated

July 2026

Reading time

12 min read

Educational guidance for compliance readiness — not legal advice. Requirements vary by jurisdiction and your specific processing activities.

Introduction

Updated for 2026 compliance practices.

Understanding how to audit cookies and scripts on HubSpot CMS is a practical compliance topic for website owners validating consent, tags, and disclosures. If you run a HubSpot-hosted site, you likely rely on the platform’s built-in cookie consent banner, custom modules, or third-party integrations. But simply adding a banner does not guarantee compliance. Regulators expect you to verify that cookies and tracking scripts behave exactly as your consent settings promise—before visitors make a choice, after they accept, and when they reject or ignore the banner.

This guide walks through a technical audit process tailored to HubSpot CMS. You will learn how to map your data flows, check consent defaults, inspect pre-consent network requests, validate tag manager triggers, test reject flows, and confirm that your privacy policy disclosures match reality. We also cover common mistakes that trip up HubSpot users and show how GDPRChecker’s scanner can automate much of the verification work. The steps here are based on general compliance principles and practical implementation experience; they do not constitute legal advice. Always consult a qualified privacy professional for your specific situation.

Why HubSpot CMS Audits Matter for GDPR Compliance

HubSpot CMS makes it easy to embed forms, chat widgets, analytics, and marketing automation scripts. But that ease can create a false sense of security. A cookie banner that appears to work may still fire tracking requests before consent, load third-party resources without disclosure, or fail to honor a visitor’s rejection. Under the GDPR and ePrivacy Directive, such gaps can lead to enforcement action, regardless of intent.

Auditing cookies and scripts on HubSpot CMS means systematically checking three layers: the consent mechanism (usually a banner or pop‑up), the underlying tag management logic (HubSpot’s native settings, Google Tag Manager, or custom code), and the actual network activity in the browser. Each layer must align with your stated purposes and legal basis. For example, if your privacy policy says you do not use advertising cookies without consent, but a HubSpot tracking script sets a cookie before the user interacts with the banner, you have a compliance gap.

Regular audits are not a one‑time project. Every time you add a new integration—say, a HubSpot chatflow, a LinkedIn Insight Tag, or a YouTube embed—you introduce new data flows. Even HubSpot updates can change default behavior. A structured audit process helps you catch these changes before they become liabilities.

Requirements and Compliance Expectations

Before diving into the technical steps, it helps to clarify what regulators and data protection authorities generally expect. The European Data Protection Board (EDPB) has issued guidelines emphasizing that consent must be freely given, specific, informed, and unambiguous. See EDPB Guidelines 05/2020 on consent. For cookies and similar tracking technologies, the ePrivacy Directive (often called the “cookie law”) requires prior informed consent, except for strictly necessary cookies.

On a practical level, this translates into several verifiable requirements:

  • Prior blocking: Non‑essential scripts and cookies must not load or set data before the visitor gives consent. This includes analytics, marketing, and social media plugins.
  • Granular choice: Visitors should be able to accept or reject by purpose (e.g., analytics, advertising) rather than a single “accept all” button.
  • Equal reject and accept: Rejecting all non‑essential cookies must be as easy as accepting them. A “reject all” button should be visible at the first layer of the banner, not buried in settings.
  • Withdrawal mechanism: Users must be able to change their mind easily, typically via a persistent cookie settings link or floating icon.
  • Transparent disclosure: Your cookie banner and privacy policy must clearly list all cookies and scripts, their purposes, durations, and any third‑party recipients.

For HubSpot CMS users, meeting these expectations often involves configuring the platform’s consent features correctly and then verifying that the configuration works in practice. Google’s Consent Mode documentation also provides a useful framework for managing tags based on consent state, though implementing it on HubSpot may require custom coding or a third‑party CMP.

Step‑by‑Step: How to Audit Cookies and Scripts on HubSpot CMS

A thorough audit follows a logical sequence: inventory, configuration review, live testing, and documentation. Below is a practical workflow you can adapt to your site.

1. Create a Cookie and Script Inventory

Start by listing every cookie and script that runs on your HubSpot pages. Don’t rely solely on the cookie declaration in your banner; many scripts set cookies dynamically or load additional resources. Use browser developer tools (F12 > Application > Cookies) and the Network tab to capture all requests. Pay special attention to:

  • HubSpot’s own tracking cookie (__hstc, hubspotutk, etc.)
  • Google Analytics, Ads, or Tag Manager scripts
  • Social media pixels (Facebook, LinkedIn, Twitter)
  • Embedded content (YouTube, Vimeo, maps)
  • Chat widgets and chatbots
  • Any custom JavaScript added via the design manager or modules

Document the name, domain, purpose, duration, and whether it is first‑party or third‑party. This inventory becomes your baseline for checking disclosures and consent behavior.

2. Review Consent Defaults in HubSpot

HubSpot offers a native consent banner (Privacy & Consent settings) and a cookie consent API. Check your configuration under Settings > Privacy & Consent:

  • Is the banner enabled and set to “Opt‑in” (not “implied consent”)?
  • Are cookie categories defined and mapped to the correct scripts?
  • Is the banner set to load immediately, blocking other scripts until interaction?
  • Does the banner appear for visitors in the EU/EEA (if geo‑targeting is used)?

If you use a third‑party CMP integrated via HubSpot, verify that the integration correctly passes consent signals to HubSpot’s tracking code. For example, HubSpot’s JavaScript API allows you to programmatically set consent: _hsq.push(['doNotTrack', {track: false}]);. Ensure this fires before any tracking calls.

3. Inspect Pre‑Consent Network Requests

This is the most critical technical check. Open a fresh incognito/private browser window, clear all storage, and load your site. Before interacting with the cookie banner, open the Network tab and reload. Filter by “JS,” “Img,” “XHR,” and “WS” to catch all request types. Look for any requests to tracking domains (e.g., google-analytics.com, facebook.com, hs-scripts.com) that occur before consent.

Common culprits on HubSpot CMS:

  • The HubSpot tracking code itself, if not configured to respect consent.
  • Google Analytics or Tag Manager snippets added to the site header or via a custom module.
  • Embedded HubSpot forms that load tracking scripts.
  • Chatflows that initiate a WebSocket connection immediately.

If you find pre‑consent requests, you need to adjust your implementation. For HubSpot’s own tracking, you can use the consent API to gate the script. For third‑party tags, consider moving them to a tag manager that supports consent triggers, or wrap them in a custom consent check.

4. Validate Tag Manager Triggers

Many HubSpot sites use Google Tag Manager (GTM) to deploy scripts. If you do, audit every tag for its firing triggers:

  • Does the tag fire on “All Pages” without any consent condition? It should not.
  • Are consent‑based triggers configured using GTM’s Consent Initialization and Consent Update events?
  • For Google tags, have you implemented Consent Mode v2 to adjust tag behavior based on consent state?

Even if you use HubSpot’s native integrations, check the underlying logic. For example, the HubSpot‑Google Analytics integration may push data regardless of consent unless you explicitly configure it to wait.

5. Test the Reject Flow

Click “Reject All” (or the equivalent) on your banner and then browse several pages. Check that:

  • No new non‑essential cookies appear in Application > Cookies.
  • Network requests to marketing/analytics domains stop.
  • The banner does not reappear aggressively on every page (though a subtle persistence indicator is acceptable).
  • The cookie settings link remains accessible to change preferences later.

Also test the “ignore” scenario: what happens if a visitor simply closes the banner without making a choice? Under GDPR, silence is not consent; your site should treat this as a rejection and block non‑essential scripts until an explicit choice is made.

6. Cross‑Check Disclosures

Finally, compare your live cookie behavior against your cookie banner text and privacy policy. Every cookie and script in your inventory should be listed with an accurate description. If you found pre‑consent requests for a script you claimed was blocked, you have a disclosure gap. Update either the implementation or the policy to reflect reality.

Common Mistakes and How to Avoid Them

Even well‑intentioned HubSpot CMS users often fall into a few traps. Recognizing these can save you time and reduce risk.

Mistake 1: Assuming HubSpot’s default banner is fully compliant. HubSpot’s native banner provides a solid foundation, but it may not block all scripts by default, especially third‑party ones added outside the consent framework. Always verify with a live scan.

Mistake 2: Forgetting about embedded content. YouTube videos, Twitter embeds, and Google Maps often set cookies as soon as the page loads, even if the visitor never interacts with the embed. Use a two‑click solution or placeholder that loads the content only after consent.

Mistake 3: Ignoring subdomains and cross‑domain tracking. If your HubSpot site uses a custom domain for landing pages or a separate blog subdomain, cookies set on one may be readable on another. Audit the entire domain landscape.

Mistake 4: Overlooking the “Reject All” button. Some implementations hide the reject option behind a “Settings” link. The EDPB has made clear that refusing consent should be as easy as giving it. Place a visible “Reject All” button on the first layer of your banner. For more on this requirement, see our guide on reject all button requirements.

Mistake 5: Not re‑auditing after changes. Every new marketing campaign, plugin, or HubSpot update can alter your cookie profile. Schedule regular audits—monthly for active sites, and immediately after any significant change.

How to Validate with GDPRChecker

Manual audits are essential for understanding your setup, but they don’t scale well. GDPRChecker’s scanner automates the verification of pre‑consent network requests, banner behavior, and disclosure gaps. Here’s how to integrate it into your HubSpot CMS audit workflow:

  1. Run a baseline scan before making any changes. The scanner will crawl your site and flag all cookies, scripts, and requests that fire before consent, along with banner compliance checks.
  2. Review the report to identify specific violations: scripts loading without consent, missing cookie descriptions, or banner design issues.
  3. Implement fixes based on the findings—adjust HubSpot consent settings, modify GTM triggers, or update your privacy policy.
  4. Re‑scan to confirm the issues are resolved. GDPRChecker’s scans help verify pre‑consent network requests, banner behavior, and disclosure gaps after changes, giving you documented evidence of compliance.
  5. Schedule recurring scans to catch regressions. Set up weekly or monthly scans and receive alerts if new tracking appears without consent.

Using a scanner does not replace legal review, but it provides the technical validation that regulators and auditors increasingly expect. It also helps you maintain a clear audit trail, which is invaluable if you ever need to demonstrate compliance to a supervisory authority.

Implementation Checklist

Use this checklist to guide your HubSpot CMS cookie and script audit. Check off each item as you complete it.

  1. Create a complete inventory of all cookies and scripts on your HubSpot site.
  2. Verify that HubSpot’s consent banner is set to “Opt‑in” mode.
  3. Confirm that cookie categories are correctly defined and mapped to scripts.
  4. Test in an incognito browser: no non‑essential requests should fire before consent.
  5. Check that HubSpot’s tracking code respects the consent API (doNotTrack).
  6. Audit all Google Tag Manager tags for consent‑based triggers.
  7. Implement Google Consent Mode v2 if using Google services.
  8. Test the “Reject All” flow: no non‑essential cookies set, and banner behavior is compliant.
  9. Verify that a “Reject All” button is visible on the first layer of the banner.
  10. Ensure embedded content (videos, maps) does not load without consent.
  11. Cross‑check your cookie banner text and privacy policy against the live inventory.
  12. Run a GDPRChecker scan to validate pre‑consent behavior and disclosures.
  13. Schedule recurring scans and document all audit results.

FAQ

What is HubSpot CMS how to audit cookies and scripts? It’s a process of systematically checking your HubSpot‑hosted website to ensure cookies and tracking scripts only fire in accordance with visitor consent choices. The audit covers consent defaults, pre‑consent network requests, tag manager triggers, and disclosure accuracy.

Do I need HubSpot CMS how to audit cookies and scripts for GDPR? Yes, if your site targets users in the EU/EEA. The GDPR and ePrivacy Directive require you to obtain valid consent before setting non‑essential cookies. An audit verifies that your technical implementation matches your legal obligations and stated policies.

How do I implement HubSpot CMS how to audit cookies and scripts? Start with a cookie inventory, review HubSpot’s consent settings, inspect network requests in a clean browser session, validate tag triggers, test reject and ignore flows, and compare findings against your disclosures. Use a scanner like GDPRChecker to automate and document the checks.

How can I verify HubSpot CMS how to audit cookies and scripts with a scanner? Run a GDPRChecker scan on your site. The tool crawls your pages, detects pre‑consent requests, checks banner behavior, and flags disclosure gaps. After fixing issues, re‑scan to confirm compliance and set up recurring scans for ongoing monitoring.

What are common HubSpot CMS how to audit cookies and scripts mistakes? Common mistakes include assuming HubSpot’s default banner blocks all scripts, forgetting about embedded content cookies, hiding the reject button, ignoring subdomains, and failing to re‑audit after site changes. Regular scanning helps catch these errors.

Next Steps for HubSpot CMS Compliance

Auditing cookies and scripts on HubSpot CMS is not a one‑and‑done task, but a continuous practice. Start with the inventory and manual checks described above, then use GDPRChecker to automate validation and catch regressions. For deeper dives into related topics, explore our guides on what is cookie consent, blocking Google Analytics before consent, and our cookie banner compliance checklist. If you’re unsure whether you even need a consent management platform, read do I need a CMP if I do not run Google Ads.

Remember, technical audits are one piece of the compliance puzzle. You also need a lawful basis for processing personal data, a transparent privacy policy, and a process for handling data subject access requests (DSARs). For an overview of the broader legal framework, see what is ePrivacy.

Ready to verify your HubSpot site? Run a free GDPRChecker scan now and get a detailed report on your cookie and script compliance.

This guide is technical implementation guidance for website owners. It is not legal advice.

GDPRChecker guides are educational resources and do not constitute legal advice. Use them to understand technical and operational privacy requirements, and consult qualified counsel for legal interpretation.

Check Your Website in Under 60 Seconds

  • Sign in required
  • GDPR-focused checks
  • Cookie banner detection
  • Privacy policy verification