Scan and block cookies with the HubSpot consent banner (BETA)
Last updated: August 23, 2023
Available with any of the following subscriptions, except where noted:
|
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.
- if you are using a cookie-blocking extension, you may see a blank page on the Cookies tab. To resolve this, turn off the extension or use an incognito window.
Scan cookies
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.

-
- 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.
- 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.
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 do not require visitor consent and will always drop on a visitor's device 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.