Skip to content
  • 日本語
  • Deutsch
  • Nederlands
  • English
  • Español
  • Português
  • Français
  • Italiano
  • Polski
  • Suomi
  • Svenska
  • 中文 - 繁體
  • Go to my account
  • Get HubSpot free
Home
HubSpot Knowledge Base
  • Help Center
  • Documentation
    • Knowledge Base Setup, how-to, and troubleshooting guides
    • API Documentation Reference for API Development
    • CMS Documentation Reference for CMS Development
  • Training
    • Academy Content Library A complete library of Academy’s free online video lessons and certification courses.
    • Academy Certification Courses A collection of lessons and practical exercises leading to an industry-recognized certification in HubSpot’s tools or strategy.
    • Classroom Training Schedule in-person training for a hands-on and personalized HubSpot training experience.
  • Community
    • CRM & Sales Hub Ask and answer questions about using HubSpot’s CRM and Sales Hub.
    • Marketing Hub Discuss and learn HubSpot’s marketing tools and inbound strategy.
    • Service Hub Learn about Service Hub and share your expertise.
    • Meet the Experts Learn how to get the most out of HubSpot from those who know it best.
    • Submit Ideas Search, vote for, and submit ideas to improve the HubSpot platform.
    • HubSpot Developers Ask questions and connect with users building on HubSpot.
    • HubSpot User Groups Meet regularly with your local community of HubSpot users.
  • Blogs
    • HubSpot Blog Marketing, sales, agency, and customer success blog content.
    • Customer Blog Examples of how real customers use HubSpot for their business.
    • Product Updates Blog Updates on the latest releases from HubSpot’s Product team.
Knowledge Base right Account & Setup right Privacy & Consent right Scan and block cookies with the HubSpot consent banner (BETA)

Scan and block cookies with the HubSpot consent banner (BETA)

Last updated: January 19, 2023

In Beta

Applies to:

All products and plans

The cookie scanning feature uses a web scraper to locate all cookies on a specific domain or subdomain. Popular cookies will be automatically categorized and described, while all other cookies can be categorized and described manually. 

After a domain has been scanned, you can block specific cookies. This will stop these cookies from being dropped on a visitor's device until they consent to them via HubSpot's cookie banner. 

Please note: cookie scanning and blocking only works with the native HubSpot cookie banner. If you're using an external cookie banner, you'll need to manage HubSpot cookies with a custom solution, such as using the cookie banner API or custom CSS/JavaScript. Some cookie banners may also offer integrations through the App Marketplace, such as Cookiebot. 

Scan cookies

You can scan any domain that is either hosted on HubSpot or has the HubSpot tracking code installed. 

Please note: when scanning for cookies, each page of your website will be loaded once. To avoid a temporary spike in traffic tracking platforms like Google Analytics, you can allowlist the following IP range: CIDR : 54.174.58.224/27.

  • In your HubSpot account, navigate to Marketing > Website > Cookie Scanning.
  • To scan an external domain for the first time:  
    • In the top right, click Add external domain. 
    • In the dialog box, enter the external subdomain and domain, then click Add domain.  
add-external-domain
    • In the top right, click Scan now. 
    • In the dialog box, click Request scan. You will receive an email when the scan is complete. 
  • To scan an internal domain or an external domain that's been scanned previously:
    • Next to a connected subdomain, click Scan now to scan it for cookies. 
    • In the dialog box, click Request scan. You will receive an email when the scan is complete. 
  • Once the scan is complete, any cookies that appear on the scanned subdomain will be displayed, along with their provider, category, description, and time until expiration. 

scanned-cookies

  • To edit a cookie's description, click its name. In the right panel, enter a new description, then click Save. 
  • To export a list of all cookies for a domain, click Export [number of] cookies above the table. In the dialog box, click the File format dropdown menu and select a spreadsheet format, then click Export.  

If you receive an error, learn how to troubleshoot the HubSpot cookie consent management tools.

Block cookies

Once you've scanned a domain, you can block some or all of its scanned cookies from dropping. This will stop the elements associated with those cookies from loading until the visitor has offered their consent through your HubSpot cookie banner, including: scripts, images, audio & video files, embedded content, and iframes. 

There are some limitations to the blocking process: 

  • Cookie scanning and blocking only works with the native HubSpot cookie banner. It is not compatible with an external or custom cookie banner. 
  • Anonymous page views will continue to be captured by the HubSpot tracking code. 
  • A single page element that contains cookies from different categories won't load unless the visitor has accepted all associated categories.
  • Uncategorized cookies will only drop if a visitor accepts all cookies.

Please note: you can add the HTML attribute data-hs-ignore to any necessary website elements that are being incorrectly blocked by the cookie scanner.

Block cookies across a HubSpot-hosted domain

  • In your HubSpot account, navigate to Marketing > Website > Cookie Scanning.
  • If you have multiple connected domains, click the domain name.
  • For unscanned subdomains, click Scan now next to the subdomain to scan it for cookies, then wait for the scan to finish.
  • With the scan complete, click the domain name. You'll then be brought to the cookie details page for that domain.
  • In the top right, click Manage cookie blocking.
  • In the dialog box, click Turn on cookie blocking. If cookie blocking has already been turned on, you can click Turn off cookie blocking to turn it off for this domain instead.

turn-off-cookie-tracking

Block cookies on individual pages or external domains

  • In your HubSpot account, navigate to Marketing > Website > Cookie Scanning.
  • Click the domain name.
  • Scan the domain for cookies.
  • In the upper right, click Manage cookie blocking.
  • In the dialog box, click Copy to copy the cookie blocking script.
    • Paste the script at the top of the head HTML of the content where you want to block cookies.
    • Save and publish your changes.

Please note: if you are using Hotjar and notice Hotjar cookies dropping, rescan your domain. Hotjar's scripts are updated regularly, which causes the script to renew and prevents HubSpot from blocking the associated cookies.

Understand cookie categories

Popular cookies are divided into categories automatically based on their function. All cookies can have a category manually set or changed, except those flagged as necessary.

The following cookie categories are available:

    • Necessary: these cookies are necessary for the website to function and cannot be switched off. Learn more about necessary cookies.
    • Analytics: these cookies collect information and report site usage statistics. Analytics cookies can also work with advertising cookies to show relevant ads and measure interactions. Learn more about analytics cookies.
    • Functionality: these cookies optimize the website's functioning. They can also be used to personalize the visitor's experience and store chat history. Learn more about functionality cookies.
    • Advertisement: these cookies use data from third-party ad providers like Facebook and Google to display relevant ads and report on ad campaign performance. Learn more about advertisement cookies.

Related content

New to HubSpot? Use these guides to get started.
Table of contents /privacy-and-consent/scan-and-block-cookies?
hubspot Copyright © 2023 HubSpot, Inc.
  • Legal Stuff
  • Privacy Policy
  • Cookie Settings