# HubSpot cookies control using Usercentrics

**URL:** <https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [June 2, 2021, 10:57am UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271 "2021-06-02T10:57:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad3113](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mohammad3113/32/9140_2.png) [@Mohammad3113](https://community.hubspot.com/u/Mohammad3113)\
**Post date:** [June 2, 2021, 10:57am UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/1 "2021-06-02T10:57:02Z")

</div>

Hi everyone

I’m using Usercentrics tool to manage the cookies for GDPR purpose,

I’m using the following code

var \_hsp = window.\_hsp = window.\_hsp || [];  
\_hsp.push([‘revokeCookieConsent’]);

to remove the HubSpot cookies if the user denied but, the question is.

If the user selects one or more of the cookies’ categories, how can I push the HubSpot Cookies under the selected categories?

I tried to follow the

> **[Consent banner API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/latest/account/settings/consent-banner/consent-banner-api)**
>
> The consent banner enables you to enable/disable different analytics scripts based on user preferences.

But there is nothing there to show how can I push a single category’s cookie.

So, what is the way to push HubSpot single-category’s cookies?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 2, 2021, 7:39pm UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/2 "2021-06-02T19:39:41Z")

</div>

@himanshurauthan , can you lend a hand here?

---

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [June 7, 2021, 4:21am UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/3 "2021-06-07T04:21:28Z")

</div>

Hello there,

You can refer to this page outlines all the possible ways you can customize your HubSpot cookies

[How to customize cookie tracking and your privacy policy alert in HubSpot?](https://knowledge.hubspot.com/getting-started-with-hubspot-v2/how-to-customize-cookie-tracking-and-your-privacy-policy-alert-in-hubspot)

Regards,

---

<div class="post-metadata">

**Author:** ![FloStu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/flostu/32/32521_2.png) [@FloStu](https://community.hubspot.com/u/FloStu)\
**Post date:** [October 21, 2021, 8:24am UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/4 "2021-10-21T08:24:23Z")

</div>

Hi there,

@Mohammad3113 can you explain how you have now included the Usercentrics CMP so that HubSpot tracking is not loaded before consent?

Best, Florian

---

<div class="post-metadata">

**Author:** ![StephaneLM](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@StephaneLM](https://community.hubspot.com/u/StephaneLM)\
**Post date:** [January 27, 2025, 11:16pm UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/5 "2025-01-27T23:16:01Z")

</div>

I know you posted this a while ago, but in case you are still looking for a solution. I would suggest looking into other options, such as [Ketch](https://www.ketch.com/), instead for instance. Hope this helps!

---

<div class="post-metadata">

**Author:** ![mchl](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mchl/32/200556_2.png) [@mchl](https://community.hubspot.com/u/mchl)\
**Post date:** [February 28, 2025, 2:25pm UTC](https://community.hubspot.com/t/hubspot-cookies-control-using-usercentrics/38271/6 "2025-02-28T14:25:36Z")

</div>

Apart from your comment just looking a lot like simple SEO/spam, how does that solve the the Original Poster’s problem?
