How to customize cookie tracking and your privacy policy alert in HubSpot

Last updated: July 13, 2018

Applies to:

Marketing Hub: Basic, Pro, Enterprise

In your HubSpot settings, you can customize how you wish to track visitors with cookies and inform them of your privacy policy. This is especially important for complying with EU cookie laws and the General Data Protection Regulation (GDPR).

A privacy alert will allow visitors to opt in or out of being tracked in your HubSpot account with cookies. This feature works for all HubSpot pages as well as any external pages you may have that are using the HubSpot tracking code. 

Please note: while these features live in HubSpot, your legal team is the best resource to give you compliance advice for your specific situation.

How does HubSpot track website visitor activity?

HubSpot uses cookies to track your website visitors and contacts. A cookie is a small text file that is left behind on a visitor's computer when they come to your site. When the HubSpot software runs on your website, it leaves behind a cookie on your visitors’ computers that helps HubSpot identify them on future visits.

Do I need to adjust my privacy policy?

If your business has a presence in Europe or if you store any data on contacts in the European Union (EU), you'll need to adjust your privacy policy to comply with their laws. The EU has mandated that member countries create laws that require websites to gain consent from end users prior to storing data on a website visitor’s computer. These regulations are designed to help your website visitors protect their privacy and determine how their behaviors online are used by others.

Under the GDPR, if a contact of yours is an EU citizen, they need to be given notice that you're using cookies to track them (in a language they can understand), and they need to consent to being tracked by cookies. 

While you could implement a custom solution to comply with EU regulations, HubSpot gives you the ability to set this privacy policy, show it to your visitors, and prompt them to consent to allowing cookies.

1. Customize your cookie policy

To access your cookie tracking information in HubSpot:

  • In your HubSpot account, click the settings icon settings in the main navigation bar. 
  • On the left, click Reports & Analytics Tracking
  • Click the Cookie Policy tab. 
  • Click Default policy.

A right sidebar menu will appear. Here, you have the following options:   

  1. Use cookies: toggle the switch on if you'd like to track your visitors with cookies.  
  2. Notify visitors that your site uses cookies (required under the GDPR): toggle the switch on if you'd like to show a banner to your visitors when they land on your site to inform them that your site uses cookies. 
  3. Require opt-in (required under the GDPR): toggle the switch on to require users to opt in to cookie tracking.  

right-sidebar-menu-toggles

If you toggle the Notify visitors that your site uses cookies switch on, you'll then have the following fields to customize: 

  • Notification terms text: this is the information visitors will see in your privacy banner. 
  • Accept button label: this is the button visitors click to accept your privacy banner's terms text.
  • Decline button labelthis is the button visitors click to accept your privacy banner's terms text. 
  • Disclaimer text: this is what visitors will see if opt-in is required for tracking. 

Click Apply when you're done. Additionally, you can ask your developer to implement additional consent status and cookie removal functions. 

 

2. Add policy

You also have the option 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 have no banner for your US site, and just have a require opt-in banner for your EU site. 

If you are a Marketing Hub Basic, Professional, or Enterprise customer and you are using the HubSpot ads tool to add the Facebook pixel to pages with the HubSpot tracking code, your privacy policy banner will automatically display when the pixel fires on your pages. If you require visitors to opt into cookie tracking, the Facebook pixel will not be able to place any cookies until the visitor confirms their consent.

Click +Add policy in your cookie policy settings. In the right sidebar menu, you have the following options:  

  • Policy label: this is the title of your privacy banner.
  • Domain: enter a domain or subdomain where your banner will appear. This needs to be just a domain and cannot include the protocol. For example, hubspot.com or info.hubspot.com is acceptable, but not http://info.hubspot.com.
  • URL Pathshow your banner on all pages with paths starting with specific text. For example, you might have a French language version appear on your site, which would have a path starting with fr.    

cookie-policy-by-domain

Please note: if a page URL matches multiple policy rules, the most specific rule will take priority. The order would therefore be (sub)domain and URL path, URL path, (sub)domain, then the default policy. For example, you have three policies for the following domains and or URL paths: info.hubspot.com, info.hubspot.com/fr, and /fr. If a visitor goes to info.hubspot.com/fr/offer they will see the info.hubspot.com/fr policy. But if they go to info.hubspot.com/de, they will see the policy for the /fr URL path. 

  • Use cookies, Notify visitors that your site uses cookies, Require opt-in: (refer to the previous section above) 
  • Click the Choose a language dropdown menu to select a different language for your policy. Alternatively, you can click Start from scratch to re-write the notification terms text, accept and decline button labels, and the disclaimer text.

sidebar-menu-add-policy

Click the toggles on or off beside each of your policies to publish or unpublish them. Click Preview beside Preview notification to see what your privacy alerts will look like on your site.

toggles-gdpr

Once you’ve added translations and applied your changes, they’ll be reflected on the specified pages on your website if they're published. 

banner-example-site

If your visitor accepts your privacy policy, then you can track them with the cookie settings you've set up in your account. If they decline your privacy policy, then they will not be tracked with cookies.

3. Notification style 

Select a color or enter a custom color for your notification banner. Click the Notification type dropdowm menu and select Top banner or Bottom banner depending on where you'd like the banner to appear on your site. Click Save when you're done.

cookie-notification-style

4. Test your privacy policy banner

To preview your policy banner before publishing to your website, toggle the switch off in the Cookie notification text  section and append ?_hsPrivacyTest to your website URL.

turn-toggle-off

After you've made all your option changes, click Save at the bottom of the page to implement your changes for testing.

Please note: this banner only applies to HubSpot cookies. HubSpot isn’t able to control the cookies placed by other scripts included on your website. However, you can choose to use the cookie consent banner to know when a visitor has given consent to place cookies in their browser. For additional information on using the banner to know when to include third-party scripts, check out this documentation

Was this article helpful?

If you still need help you can get answers from the , or to contact support.

Previous article:

Next article: