Set up cookie tracking settings and consent banners
Last updated: July 14, 2025
Available with any of the following subscriptions, except where noted:
|
A consent banner allows visitors to opt in or opt out of being tracked with cookies in your HubSpot account. This feature works for all HubSpot pages as well as any external pages with the HubSpot tracking code installed.
Super Admins and users with permission to edit website settings can customize visitor cookie tracking and consent banners to comply with global data protection and privacy laws, such as the General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA).
Please note: while HubSpot has cookie tracking and privacy policy settings, your legal team is the best resource to give you compliance advice for your specific business circumstances.
Learn more about the about consent banner tools in the HubSpot consent banner Frequently Asked Questions article.
Opt in to the v2 consent banner editor
If your account was created after November 2nd, 2022, you have access to the v2 consent banner by default. If your account was created prior to that date, you have access to the v1 cookie consent banner editor, but it's recommended to opt in to the v2 editor.
- 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.
- At the top, click Switch manually.
- Review the changes, then click Next.
- Your internal domains will appear. If you need to connect external domains, click Add external domain. In the pop-up box, enter your domain.
- Click Next.
- To assign a domain to each policy, in the policy row, click Assign to a domain and select the domain.
- Click Done.
Before you get started
To set up a consent banner with the new editor, HubSpot will need to verify the website domain to which you're adding the banner.
To verify a domain with HubSpot, you must do one of the following:
Set up a consent banner for a connected domain
If you're a Super Admin or a user with permission to edit website settings, to set up and edit 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.
- 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.
- Under Domains Connected to HubSpot, click the domain name, which will be marked as having an Inactive banner.
- Click the name of a banner to edit an existing banner, or click Create consent banner to create a new banner.
Configuration
When creating or editing a consent banner, set up the banner's configuration details:
- Enter the Internal consent banner name, which is the name that'll display in your HubSpot account.
- To set a subdirectory for a more targeted banner, enter a URL path. For example, if the French version of your website is hosted on the /fr subdirectory, enter fr.
- Select the countries in which the banner will be displayed to visitors. The visitor's browser IP address determines which country they're in. If you don't select any countries, the banner will be displayed to all visitors.
- To support Global Privacy Control browser signals on pages with the consent banner, toggle the the Respond to Global privacy signaling switch on.
- To turn on advanced options, click to expand the Advanced cookie banner settings section. If you turn either setting on, the banner won't display on these pages and your visitors won't have the option to consent of decline tracking through the banner. You can review HubSpot's developer documentation for more information on turning off cookies, or give users the option to reopen the consent banner with a cookie settings button.
- Deactivate cookies?: toggle the switch to never allow cookie tracking for the pages or countries specified.
- Allow all cookies?: toggle the switch on to always allow cookie tracking for the pages or countries specified.
- Click Next, or if you've selected to deactivate or allow all cookies, click Publish.
Notifications
To set up how users are informed about tracking on your site:
- Select a banner type. Learn more about the consent banner types.
- Notification: display a notification to your visitors to show that your site uses cookies.
- Opt-in: require visitors to opt in to cookie tracking. If you select this option, to show visitors the cookies that'll be put on their browser by category, select the Allow opt-in by category checkbox. Learn more about the cookies and their categories.
- Opt-out: visitors automatically accept all cookies, but they can opt out via the banner. If you select this option, to allow visitors to opt out of cookies by category, select the Allow opt-out by category checkbox. Learn more about the cookies and their categories.
- Select the default language.
- If you select Notification, review or customize the default text in 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 or Opt-out, review or edit the default text in 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.
- Decline button text: button text visitors click to decline your privacy banner's terms.
- Disclaimer text: text displayed when opt-in or opt-out is required.
- If you select Allow opt-in by category or Allow opt-out by category, review or edit the default text in the following fields for each cookie category:
- Cookie settings button text: enter the text that the visitor can click in the consent banner to view the cookies by category.
- Label: for each category, enter the label you want for the category. This'll appear in the left panel and at the top of the right panel in the cookie banner 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.
- Click Publish.
Learn how to customize your consent banner.
Please note: if you're using the HubSpot ads tool to add a pixel to pages with the HubSpot tracking code, your 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.
Set up a consent banner for an external domain
To set up a consent banner for externally hosted domains:
- 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 external domain.
- In the dialog box, enter the domain or subdomain URL. If the root domain redirects to a subdomain, add the subdomain. For example, If you're adding xyz.com but that page redirects to www.xyz.com, you must add www.xyz.com.
- Click Add domain. HubSpot will attempt to verify the domain based on whether the tracking code is present at the specified URL.
- Once verified, click Create consent banner, and continue setting up your banner.
Add a Cookie Settings button to the cookie consent banner
You can add a button for visitors to re-open the 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.
- Click the domain name.
- Click Cookie Settings Button to expand the section. Then, 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.
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. I's 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 won't be tracked with unnecessary cookies. HubSpot forms will display and collect submissions.
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.
Please note: the consent banner blocks some HubSpot cookies, but there are some necessary cookies that will be dropped in the visitors browser. Opting out of cookies prevents anonymized analytics data (e.g., traffic, page views) from being associated with a specific contact record. The 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.