# Tracking Code Cookie

**URL:** <https://community.hubspot.com/t/tracking-code-cookie/72252>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [January 5, 2023, 10:19am UTC](https://community.hubspot.com/t/tracking-code-cookie/72252 "2023-01-05T10:19:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PFarkas](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@PFarkas](https://community.hubspot.com/u/PFarkas)\
**Post date:** [January 5, 2023, 10:19am UTC](https://community.hubspot.com/t/tracking-code-cookie/72252/1 "2023-01-05T10:19:39Z")

</div>

Hello!  
Is that possible to hide Tracking Code cookies part of this code?

\<!-- Start of HubSpot Embed Code --\>  
\<script type=“text/javascript” id=“hs-script-loader” async defer src=“[//js-eu1.hs-scripts.com/xxxxxx.js](https://js-eu1.hs-scripts.com/xxxxxx.js)”\>\</script\>  
\<!-- End of HubSpot Embed Code --\>

We have our own cookies accept and we dont want to show two cookies accept to user.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 9, 2023, 8:25pm UTC](https://community.hubspot.com/t/tracking-code-cookie/72252/2 "2023-01-09T20:25:51Z")

</div>

Hi, @PFarkas 👋 Thanks for reaching out!

Here is the developer documentation for the Tracking Code and Cookie banner APIs:

- [Tracking Code API Overview 1](https://legacydocs.hubspot.com/docs/methods/tracking_code_api/tracking_code_overview)
- [Tracking Code API Overview 2](https://developers.hubspot.com/docs/api/events/tracking-code)
- [Cookie Banner](https://developers.hubspot.com/docs/api/events/cookie-banner?hsLang=en)

Hey, @Teun @CMcKay, do you have any experience here?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![CMcKay](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cmckay/32/80666_2.png) [@CMcKay](https://community.hubspot.com/u/CMcKay)\
**Post date:** [January 9, 2023, 8:50pm UTC](https://community.hubspot.com/t/tracking-code-cookie/72252/3 "2023-01-09T20:50:31Z")

</div>

Hey @PFarkas and [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) ,

You can get rid of the banner by using the do\_not\_track method for the cookies function: [https://developers.hubspot.com/docs/api/events/cookie-banner](https://developers.hubspot.com/docs/api/events/cookie-banner)

 ![CMcKay_0-1673297406129.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/3/f3fc9c6b181d80bae61f3b838790f69a859e6cea.png)

Or you could combine your own cookie consent banner with the tracking code to present a single banner to the user. This way, the user will only see one banner and will be able to manage their cookie preferences in a single location. Here’s how you can programmatically accept the husbpot cookies:

[https://community.hubspot.com/t5/APIs-Integrations/How-to-integrate-a-self-developed-cookie-consent-banner-with/m-p/553348/highlight/true#M49962](https://community.hubspot.com/t5/APIs-Integrations/How-to-integrate-a-self-developed-cookie-consent-banner-with/m-p/553348/highlight/true#M49962)

Let me know if you have any questions.

Carter McKay

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 9, 2023, 9:03pm UTC](https://community.hubspot.com/t/tracking-code-cookie/72252/4 "2023-01-09T21:03:21Z")

</div>

Thanks, @CMcKay 🙌

---

<div class="post-metadata">

**Author:** ![CMcKay](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cmckay/32/80666_2.png) [@CMcKay](https://community.hubspot.com/u/CMcKay)\
**Post date:** [January 9, 2023, 9:15pm UTC](https://community.hubspot.com/t/tracking-code-cookie/72252/5 "2023-01-09T21:15:24Z")

</div>

100%
