How to Add a Cookie Policy to HubSpot

Last updated on November 24, 2026

This guide explains how to generate a Cookie Policy and add it to your HubSpot website. A Cookie Policy discloses the types of cookies your website uses and their purposes. It supports the transparency requirements set out in privacy laws such as the GDPR and the ePrivacy Directive.

Prerequisites

  • A CookieYes account (if you don't have one, sign up for free).
  • Admin access to your HubSpot website.
Note

After sign-up, you are directed to the installation screens. Install the cookie banner to support GDPR compliance for your use of cookies. To create a cookie policy first, skip the installation and go to the CookieYes Dashboard.

  1. Log in to your CookieYes account.
  2. From the top navigation bar, select Legal Policies.
  3. From the Cookie Policy section, click + Generate.
legal policies dashboard

Step 2: Configure language settings

  • Select your primary language. The chosen language will be highlighted with a checkmark.
  • (Optional) Enable Generate policy in multiple languages to add more languages. This feature is available on Basic, Pro and Ultimate plans.
  • Click Save draft to save your progress or Next to continue.
Language settings

Step 3: Add about cookies details

In the About cookies section, edit the heading and description to explain what cookies are and why your website uses them, either by keeping the default text or customising it to better match your website’s practises.

About Cookies

Step 4: Add use of cookies details

In the Use of Cookies section, describe how your store uses cookies, such as for functionality, analytics, performance, or advertising. You can keep the default text if it is suitable, or update it for accuracy. Once done, use the Preview cookie policy to review the formatting and tone before proceeding.

Use of cookies

Step 5: Review and edit types of cookies

In the Types of Cookies section, you will see a list of cookies from your most recent website scan. If needed, you can refresh the list by clicking Scan again to capture any new cookies. The cookies are organised into categories such as Necessary, Functional, Analytics, Performance and Advertisement. Review each entry carefully to verify the cookie name, duration, and purpose for accuracy.

Types of cookies

In the Cookie Preferences section, keep the default heading (Manage cookie preferences) and description, or update them with instructions specific to your users. Set the Effective Date for the cookie policy. Preview the policy to verify the details and when confirmed, click Generate cookie policy to generate the policy.

Cookie preferences

The Revisit consent widget enables your website visitors to manage their cookie preferences. You can remove the code in the field if you don’t want a widget to be displayed.

After you generate your cookie policy, review the preview in each selected language. Click Add policy to site to open a modal with ways to add your cookie policy.

Add policy to site

Adds the cookie policy using your existing cookie banner script. The published policy updates automatically whenever you make changes in CookieYes.

Step 1: Select One-click install

In the modal, select One-click install.

Step 2: Create a policy page in HubSpot

  1. Log in to your HubSpot account.
  2. Go to Content > Website Pages.hubspot-add-page.png
  3. Click Create a website page, then select Start with blank page.create-website-page-hs.png
  4. Click Edit manually.
  5. In the top-right corner of the page editor, click Settings.
  6. On the General tab, enter Cookie Policy in Internal page name and Page title.
  7. In Page URL, enter cookie-policy in Content slug.title-slug-of-new-page.png
  8. Copy the URL of the cookie policy page and paste it into the CookieYes web app.page-url-cookie-policy.png

Step 3: Embed the policy code

  1. In the page editor, click + Add section.add-section-hs.png
  2. Select Blank layouts > 1-column layout.one-column-layout.png
  3. In the section, click + (Add), select Rich Text, then drag the module into the section.rich-text.png
  4. In the Rich Text module toolbar, go to Advanced > Source code.
  5. Paste <div id="cky-auto-cookie-policy"></div> into the source code window, then click Save changes.edit-source-code.png
  6. Click Publish.click-publish.png

Step 4: Publish and verify

  1. Return to the CookieYes web app.
  2. Click Publish cookie policy.publish-policy.png
  3. Open the live cookie policy page on your HubSpot website.

Your cookie policy page is now live on your HubSpot website. You can link the cookie policy in your website footer, and within your cookie banner so visitors can read it before they give consent.

Option 2: Hosted URL

Displays your cookie policy through a hosted link. The policy updates automatically whenever you make changes in CookieYes.

Step 1: Copy the hosted URL

  1. In the modal, select Hosted URL.
  2. Click Copy URL.
hosted-url.png

By default, the policy uses the visitor’s browser language. To set a specific language, add its code to the end of the URL. For example, /fr for French: https://legal.policygenerators.com/cookie-policy/xxxxxxxxxxxxxxxxx/fr

Tip

If someone else manages your website, click Send URL to a teammate to share the link with them.

These steps add the link to your footer menu, though you can place it anywhere on your site.

  1. Log in to your HubSpot account.
  2. In the top navigation bar, click the Settings icon.
  3. In the left sidebar, go to Content > Navigation menus.nav-menu.png
  4. Select your footer menu.
  5. Click Add menu item > Add URL Link. Enter Cookie Policy as the label, select URL, then paste the hosted URL.
  6. Click Save.add-new-menu.gif

Option 3: Code snippet

Adds the cookie policy using a JavaScript snippet. The published policy updates automatically whenever you make changes in CookieYes.

Step 1: Copy the code snippet

  1. In the modal, select Code snippet.
  2. Click Copy code.
copy-code-cs.png
Tip

If someone else manages your website, click Send code to a teammate to share the code with them.

Step 2: Create a policy page in HubSpot

  1. Log in to your HubSpot account.
  2. Go to Content > Website Pages.webiste-pages-addn.png
  3. Click Create a website page, then select Start with blank page.create-website-page-hs.png
  4. Click Edit manually.
  5. In the top-right corner of the page editor, click Settings.
  6. On the General tab, enter Cookie Policy in Internal page name and Page title.
  7. In Page URL, enter cookie-policy in Content slug.title-slug-of-new-page.png

Step 3: Embed the policy code

  1. In the page editor, click + Add section.add-section-hs.png
  2. Select Blank layouts > 1-column layout.one-column-layout.png
  3. In the section, click + (Add), select Rich Text, then drag the module into the section.rich-text.png
  4. In the Rich Text module toolbar, go to Advanced > Source code.
  5. Paste the JavaScript snippet into the source code window, then click Save changes.edit-source-code.png
  6. Click Publish.click-publish.png

Option 4: HTML format

Adds the cookie policy as static HTML. You update the page manually whenever the policy changes.

Step 1: Copy the HTML

  1. In the modal, select HTML format.
  2. Select your preferred language.
  3. Click Copy code.
html-format.png

If someone else manages your website, click Send code to a teammate to share the code with them.

Step 2: Create a policy page in HubSpot

  1. Log in to your HubSpot account.
  2. Go to Content > Website Pages.webiste-pages-addn.png
  3. Click Create a website page, then select Start with blank page.create-website-page-hs.png
  4. Click Edit manually.
  5. In the top-right corner of the page editor, click Settings.
  6. On the General tab, enter Cookie Policy in Internal page name and Page title.
  7. In Page URL, enter cookie-policy in Content slug.title-slug-of-new-page.png

Step 3: Add the HTML

  1. In the page editor, click + Add section.add-section-hs.png
  2. Select Blank layouts > 1-column layout.one-column-layout.png
  3. In the section, click + (Add), select Rich Text, then drag the module into the section.rich-text.png
  4. In the Rich Text module toolbar, go to Advanced > Source code.
  5. Paste the HTML into the source code window, then click Save changes.edit-source-code.png
  6. Click Publish.click-publish.png
Note

To remove the Cookie Policy heading at the top of the page, delete the following line from the HTML code: <h1 class="cookie-policy-h1">Cookie Policy</h1>

Frequently asked questions

  1. What should I do if my cookie policy does not appear on my website?Check that the policy is added correctly for the method you used:
    • One-click install: Make sure the CookieYes banner script is active, and the policy page URL in CookieYes is correct.
    • Hosted URL: Make sure the link on your website matches the URL from CookieYes.
    • Code snippet or HTML format: Make sure the full code is pasted in your editor’s HTML view.
    Then clear your website and browser cache and reload the page.
  2. How can I update my cookie policy if it shows outdated cookies or no cookies?Scan your website again. If you’re still creating your policy, click Scan again on the Types of cookies page. If it’s already published, go to Cookie Manager and click Scan now.Your policy updates automatically. If you used the HTML format, republish it and replace the code on your website.
  3. How can I change the language of my cookie policy?If you’re still creating your policy, select your language in the Configure language settings step. If it’s already published, click Edit policy, change the language, and republish.edit-policy-cpg.pngIf you used the HTML format, select the language when copying the code, then replace the code on your website.
Note

The generated policy is not legal advice, so review it against your data practices and applicable laws before publishing.

Conclusion

Your cookie policy is now live on your HubSpot website. Link it in your website footer and within your cookie banner so visitors can read it before they give consent. If you used HTML format, update the page whenever you change the policy in CookieYes.

Was this article helpful?

Have more questions?

Reach out to us and we'll answer them.

Contact us