<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to access cookie ID in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1151723#M82103</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are looking into some projects where we would need to access HubSpot cookie ID. We are not sure yet which solution we may use and it's possible that we will just use our custom code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Mila&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2025 07:36:25 GMT</pubDate>
    <dc:creator>MTarnopolska</dc:creator>
    <dc:date>2025-05-13T07:36:25Z</dc:date>
    <item>
      <title>How to access cookie ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1151723#M82103</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are looking into some projects where we would need to access HubSpot cookie ID. We are not sure yet which solution we may use and it's possible that we will just use our custom code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Mila&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 07:36:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1151723#M82103</guid>
      <dc:creator>MTarnopolska</dc:creator>
      <dc:date>2025-05-13T07:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to access cookie ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1151965#M82114</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/549528"&gt;@MTarnopolska&lt;/a&gt;&lt;/SPAN&gt;, I hope that you are well!&lt;BR /&gt;&lt;BR /&gt;Great question, thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;For information around the topic, here are some resources that might be of interest:&lt;BR /&gt;&lt;BR /&gt;- &lt;A href="https://knowledge.hubspot.com/privacy-and-consent/what-cookies-does-hubspot-set-in-a-visitor-s-browser" target="_blank"&gt;Cookies set in your visitor's browser by HubSpot&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://knowledge.hubspot.com/account/how-does-hubspot-track-visitors" target="_blank"&gt;Track visitors in HubSpot&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://knowledge.hubspot.com/privacy-and-consent/hubspot-cookie-security-and-privacy" target="_blank"&gt;Cookies set on HubSpot's websites&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/reference/api/analytics-and-events/cookie-banner/cookie-banner-api" target="_blank"&gt;Cookie consent banner API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, I have found this similar post that might help you, more precisely, the solution from &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/495125"&gt;@ModuleMaestro&lt;/a&gt;&lt;/SPAN&gt; on this post "&lt;A href="https://community.hubspot.com/t5/CMS-Development/HubSpot-Cookie/m-p/840203" target="_blank"&gt;HubSpot Cookie&lt;/A&gt;".&lt;BR /&gt;&lt;BR /&gt;Let me know if that helped?&lt;BR /&gt;&lt;BR /&gt;Have a great day! &lt;span class="lia-unicode-emoji" title=":sun_with_face:"&gt;🌞&lt;/span&gt;&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 15:21:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1151965#M82114</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-05-13T15:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to access cookie ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1154240#M82172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/549528"&gt;@MTarnopolska&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Here is the way to get Hubspotutk&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;function getHubSpotCookie() {
  const name = ""hubspotutk="";
  const decodedCookie = decodeURIComponent(document.cookie);
  const cookies = decodedCookie.split(';');
  for (let i = 0; i &amp;lt; cookies.length; i++) {
    let c = cookies[i].trim();
    if (c.indexOf(name) === 0) {
      return c.substring(name.length, c.length);
    }
  }
  return null;
}

const hubspotutk = getHubSpotCookie();
console.log(""HubSpot Cookie ID to send:"", hubspotutk);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you can use it as per your requirement."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-root="1"&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 14:25:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-access-cookie-ID/m-p/1154240#M82172</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2025-05-19T14:25:48Z</dc:date>
    </item>
  </channel>
</rss>

