HubSpot Consent API
HubSpot Consent API lets HubSpot adjust how it tracks visitors based on their consent. You can use CookieHub to control HubSpot’s consent state so HubSpot only loads services that track visitors once the user has granted the cookie consent that the tracking service requires.
CookieHub fully supports HubSpot Consent API as of version 2.8.13. It can be enabled under Integrations in the Settings tab of your CookieHub dashboard. Once enabled, CookieHub automatically passes the required signals to HubSpot .
What does HubSpot Consent API do?
HubSpot Consent API is used to prevent tracking technologies from running until they have consent.
Parameters
HubSpot Consent API has the following consent parameters:
| Parameter | Purpose |
|---|---|
analytics |
Grants consent to use cookies to gather analytics data from the website visitor. |
advertisement |
Grants consent to use cookies to help serve personalized ads to the visitor. |
functionality |
Grants consent to use cookies for required functionality for your website to function (e.g., authentication). |
CookieHub integration
- ✅ No manual JavaScript setup needed
- ✅ Signals are sent automatically to HubSpot
- ✅ Works with both HTML and GTM implementations
- ✅ Always in sync with CookieHub categories
Implementation options
HTML integration
- Add the CookieHub script in your site’s
<head> - Enable HubSpot integration in the dashboard
- Consent signals are applied automatically when visitors accept or reject cookies
GTM integration
- Use the CookieHub CMP template from the GTM Community Template Gallery
- Enter your CookieHub domain code
- Set the trigger to Consent Initialization – All Pages
- Save and publish
This ensures HubSpot receives consent signals before it starts tracking.
Parameter mapping
| CookieHub category | HubSpot consent field |
|---|---|
| Marketing | advertisement |
| Analytics | analytics |
| Preferences | – (not used by HubSpot) |
| Necessary | Always allowed (HubSpot core functionality) |
Parameters are updated automatically whenever a user changes consent.
When is HubSpot Consent API v2 required?
You should enable HubSpot Consent API v2 if:
- You use HubSpot for analytical purposes or to load other tracking services.
- You want accurate session tracking that respects privacy regulations
Summary of features
| Feature | CookieHub Support |
|---|---|
| HubSpot Consent API v2 integration | ✅ Yes |
| HTML script integration | ✅ Yes |
| GTM integration with template | ✅ Yes |
| Automatic parameter mapping | ✅ Yes |