Skip to content

Customize your cookie tracking settings and consent banner

Last updated: October 17, 2024

Available with any of the following subscriptions, except where noted:

All products and plans

Super Admins and users with permission to edit website settings can customize visitor cookie tracking and consent banners to comply with EU cookie laws and the General Data Protection Regulation (GDPR).

Please note: the cookie consent banner will be sunset and all users will be migrated to a newer verison in July 2024. It is recommended to use the cookie consent banner. Learn more about this change on HubSpot's changelog

A cookie consent banner allows visitors to opt in or opt out of being tracked in your HubSpot account with cookies. This feature works for all HubSpot pages as well as any external pages with your HubSpot tracking code installed.

To learn more about the most commonly asked questions about HubSpot's consent banner tools, check out the frequently asked questions.

Please note: while HubSpot has cookie tracking and consent banner settings, your legal team is the best resource to give you compliance advice for your specific business circumstances.


Set up and edit your cookie consent banner

If you're a super admin or a user with permission to edit website settings, continue reading how to set up and edit cookie consent banners.

Please note:

  • 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.
  • if your account was created after November 22nd, 2022, or if you have opted-in to the new consent banner, learn how to set up and edit your cookie consent banner.

Set up your default consent banner

  • In your HubSpot account, click the settings settings icon in the top navigation bar.
  • In the left sidebar menu, navigate to Privacy & Consent.
  • Click the Cookies tab.
  • Click Default policy.
  • In the right panel, you have the following options:
    • Notification: select this option to display a notification to your visitors to show that your site uses cookies.
    • Opt-in: select this option to require users to opt-in to cookie tracking. If you select this option, you can also select the Allow opt-in by category checkbox to show your visitors the cookies that will be put on their browser by category. Learn more about the cookies and their categories.
    • Opt-out (available in the new version of the cookie banner only): select this option for visitors to automatically accept all cookies, but they can opt-out via the banner. If you select this option, you can also select the Allow opt-out by category checkbox to allow visitors to opt-out of cookies by category. Learn more about the cookies and their categories

Learn more about consent banner types.

  • If you select Notification, you can customize the following fields:
    • Notification text: text displayed in your privacy banner.
    • Accept button text: button text visitors click to accept your privacy banner's terms.
  • If you select Opt-in, you can also customize the following fields: 
    • Decline button text: button text visitors click to decline your privacy banner's terms.
    • Disclaimer text: text displayed if opt-in is required for tracking.
  • If you select the Allow opt-in by category or the Allow opt-out by category checkbox, you must customize the following fields for each cookie category. To edit these fields for a specific category, click the cookie category name to expand the editing options:
    cookie-banner-settings 
    • Cookie settings button text: enter the text that the visitor can click in the cookie consent banner to view the cookies by category.
    • Label: for each category, enter the label you want for the category. This will appear in the left panel and the top of the right panel in the cookie banner's dialog box.
    • Description: for each category, enter the description for the category. This will appear in the right panel in the cookie banner's dialog box.
    • Always active toggle text: for the Necessary cookies category, enter text to indicate that these cookies will be active. Because these cookies are necessary, visitors can't opt out of this individual category when they accept the terms of your consent banner.
    • Accept all button text: enter text for the button that visitors can click to accept all categories of cookies.
    • Save button text: enter text for the button that visitors can click to save their cookie preferences.
  • When you're done, click Publish to publish the banner. You can later unpublish a cookie banner so that it doesn't appear on your website by clicking to toggle the switch to the right of the banner off.
  • Below the table on the right, select a banner from the Select a banner to preview dropdown menu to see how the privacy policies will appear on your site.

    cookie-banner-preview

If you want to allow visitors to revoke their consent for cookies installed by the cookie banner, check out the following steps to add a cookie settings button. Learn more about implementing additional consent status and cookie removal functions in HubSpot's developer documentation.

Please note: if you're using the HubSpot ads tool to add a pixel to pages with the HubSpot tracking code, your cookie consent banner will automatically display when the pixel fires on your pages. If you require visitors to opt into cookie tracking, the pixel will not be able to place any cookies until the visitor confirms their consent.

Add a new cookie consent banner (optional)

Please note: if your account was created after November 2nd, 2022, start by following the steps for adding a cookie consent banner using the new editor. You'll then return to this section after completing those initial steps.

You can choose to show different versions of your cookie consent message based on domains, subdomains, specific URL paths, or both domains and URL paths that you specify. For example, you can choose not to have an opt-in banner for your US site, and only require an opt-in banner for your EU site.

  • In your HubSpot account, click the settings settings icon in the top navigation bar.
  • In the left sidebar menu, navigate to Privacy & Consent.
  • Click the Cookies tab.
  • Click Add policy. In the right panel, you have the following options:
    • Policy label: enter the title of your privacy banner.
    • Domain: enter a domain or subdomain where your banner will appear. This must be entered as a domain without the protocol (e.g., hubspot.com or info.hubspot.com is acceptable, but not http://info.hubspot.com). Include www. if it is included when your site loads in a web browser.
    • URL Path: set a subdirectory for a more targeted banner (e.g., if the French version of your website is hosted on the /fr subdirectory, enter fr).
    • Countries: display the banner to visitors from specific countries by selecting the target countries from the dropdown menu. HubSpot uses your visitor's browser IP address to determine which country they're in.

country-dropdown-cookie-policy-banner

Please note: if a page URL matches multiple banner rules, the most specific rule will take priority (in order from most to least specific: (sub)domain and URL path, URL path, (sub)domain, then the default banner). For example, you may have three banners for the following domains and or URL paths: info.hubspot.com, info.hubspot.com/fr, and /fr. A visitor to info.hubspot.com/fr/offer will see the info.hubspot.com/fr banner, while a visitor to info.hubspot.com/fr will see the banner for the /fr URL path.

  • Click Next. Now, you can customize your notifications to your visitors.
    • Notification: select this option to display a notification to your visitors to show that your site uses cookies.
    • Opt-in: select this option to require users to opt-in to cookie tracking. If you select this option, you can also select the Allow opt-in by category checkbox to show your visitors the cookies that will be put on their browser by category. Learn more about the cookies and their categories.
    • Opt-out (available in the new version of the cookie banner only): select this option for visitors to automatically accept all cookies, but they can opt-out via the banner. If you select this option, you can also select the Allow opt-out by category checkbox to allow visitors to opt-out of cookies by category. Learn more about the cookies and their categories.

Learn more about consent banner types.

  • If you select Notification, you can customize the following fields:
    • Notification text: text displayed in your privacy banner.
    • Accept button text: button text visitors click to accept your privacy banner's terms.
  • If you select Opt-in, you can also customize the following fields: 
    • Decline button text: button text visitors click to decline your privacy banner's terms.
    • Disclaimer text: text displayed if opt-in is required for tracking.
  • If you select the Allow opt-in by category or the Allow opt-out by category checkbox, you must customize the following fields for each cookie category. To edit these fields for a specific category, click the cookie category name to expand the editing options:
    cookie-banner-settings 
    • Cookie settings button text: enter the text that the visitor can click in the cookie consent banner to view the cookies by category.
    • Label: for each category, enter the label you want for the category. This will appear in the left panel and the top of the right panel in the cookie banner's dialog box.
    • Description: for each category, enter the description for the category. This will appear in the right panel in the cookie banner's dialog box.
    • Always active toggle text: for the Necessary cookies category, enter text to indicate that these cookies will are active. Because these cookies are necessary, visitors can't opt out of this individual category when they accept the terms of your consent banner.
    • Accept all button text: enter text for the button that visitors can click to accept all categories of cookies.
    • Save button text: enter text for the button that visitors can click to save their cookie preferences.
  • When you're done, click Publish to publish the banner. You can later unpublish a cookie banner so that it doesn't appear on your website by clicking to toggle the switch to the right of the banner off.
  • Below the table on the right, select a banner from the Select a banner to preview dropdown menu to see how the privacy policies will appear on your site.

    cookie-banner-preview

If you want to allow visitors to edit their consent further, you can work with a developer to implement that functionality using the tracking code API. Learn more about implementing additional consent status and cookie removal functions in the developers documentation.

If you want to allow visitors to revoke their consent for cookies installed by the cookie banner, check out the following steps to add a cookie settings button.

Please note: if you're using the HubSpot ads tool to add a pixel to pages with the HubSpot tracking code and your cookie consent banner requires visitors to opt into cookie tracking, the pixel will only place cookies once the visitor confirms their consent in the banner.

Customize the style of the banner

Please note: if you create a cookie banner using the new editor, learn how to customize your consent banner with the new editor (Marketing or Content Hub Starter, Professional, and Enterprise only).

Customize the colors and style of your cookie consent banner. As you make changes, you can view a preview of the banner on the right of the banner style options.

  • In your HubSpot account, click the settings settings icon in the top navigation bar.
  • In the left sidebar menu, navigate to Privacy & Consent.
  • Click the Cookies tab.
  • Select Top or Bottom banner position depending on where you want the banner to appear on your site.
  • Choose a color for the banner by selecting a default color or selecting a custom color. The colors chosen are determined by your brand colors.
  • By default, the banner will not include a dismissal option. To add a close button to the banner, click to toggle the Close button switch on.
  • In the bottom left, click Save.

cookie-banner-close-button

Manage cookies on certain pages

You can deactivate cookies on certain pages, based on the URL. This will not remove existing cookies set on other pages, but will prevent new cookies from being dropped on these pages. Turning on this option does not display a consent banner.

If you are using the new consent banner editor, you can allow all cookies to load on certain pages, based on the URL. Turning on this option does not display a consent banner.

  • In your HubSpot account, click the settings settings icon in the top navigation bar.
  • In the left sidebar menu, navigate to Privacy & Consent.
  • Click the Cookies tab.
  • Click Add policy. In the right panel, you have the following options:
    • Policy label: enter a title for this policy that will deactivate cookies on the URL path you enter.
    • Domain: enter a domain or subdomain where cookies will be deactivated. This must be entered as a domain without the protocol (e.g., hubspot.com or info.hubspot.com is acceptable, but not http://info.hubspot.com).
    • URL Path: set a subdirectory to target more specifically where the cookies will be deactivated (e.g., if you want to deactivate cookies on all pages in the /private subdirectory, enter /private).
  • Select Deactivate cookies. This will deactivate all cookies on this URL path.
    • If you are using the new consent banner editor, click Advanced Settings. Then, you can click to toggle the Deactivate cookies? or Allow all cookies? switch on or off.
  • Click Publish.

You can also review HubSpot's developer documentation for more information on turning off cookies.

Add a Cookie Settings button to the cookie consent banner

To add a button for visitors to re-open the cookie consent banner and revoke their cookie consent to the cookies implemented or loaded by the cookie consent banner:

  • In your HubSpot account, click the settings settings icon in the top navigation bar.
  • In the left sidebar menu, navigate to Privacy & Consent.
  • Click the Cookies tab.
  • In the Cookie settings button section, click Copy to copy the code.
  • Add the code to the pages of your site that have the HubSpot tracking code, where you want the Cookie settings button to appear.

If you want to install the code on all pages, most content management systems can install code to all pages on your site, such as a footer file that is referenced across all pages. In HubSpot, you can add the code to the footer HTML of all pages on a specific domain. It is recommended to check with your developer to determine how to do this on external sites.

Please note: if Require opt-in is not turned on for your cookie banner, once the cookie banner is closed in a browser, you cannot re-open the banner. This is because if the banner does not require visitors to opt-in, there is no opt-in consent they'd need to revoke or update.

Understand how contacts interact with the cookie consent banner

If a visitor accepts your consent banner, you can track them with the cookie settings you've set up in your account. If a visitor declines your consent banner, they will not be tracked with cookies.

Please note: the cookie consent banner blocks some HubSpot cookies, but there are some necessary cookies that will be dropped. Opting out of cookies prevents anonymized analytics data (e.g., traffic, page views) from being associated with a specific contact record.

The cookie consent banner also blocks cookies from HubSpot integrations, including Google Analytics and Google Tag Manager. HubSpot can only block these cookies if you use the integrations. HubSpot cannot automatically block cookies from scripts you manually place on the page.

After contacts interact with your cookie consent banner, you can view a single contact's interaction, create a list of contacts based on their interaction, and report on interactions.

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.