<?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 Re: Hubspot Chat Google Ads Click ID in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176732#M83241</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the HubSpot chatbot does not natively support writing contact properties like gclid without custom development. However, here’s the &lt;STRONG&gt;technically correct and supported way to make this work&lt;/STRONG&gt;:&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;What You Can Do:&lt;/H3&gt;&lt;P&gt;&lt;STRONG&gt;1. Capture gclid using a cookie:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;HubSpot’s default tracking cookie (_hstc) &lt;STRONG&gt;does not store the gclid&lt;/STRONG&gt; by default.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You must &lt;STRONG&gt;create a custom script&lt;/STRONG&gt; on your website to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Read the gclid from the URL.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Store it in a first-party cookie like hubspot_gclid.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Pass the gclid to HubSpot via a form or tracking API:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;You’ll need to ensure the chatbot (conversational bot flow) includes an &lt;STRONG&gt;email capture&lt;/STRONG&gt; step.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Once you have the email, use one of two options to set the gclid:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;Two Technical Paths:&lt;/H3&gt;&lt;H4&gt;&lt;STRONG&gt;Option A: Use a Hidden Field in a Form&lt;/STRONG&gt;&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Add a hidden field for gclid in a HubSpot form.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Populate that hidden field via Javascript&amp;amp;colon;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;javascript&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Copy&lt;SPAN class=""&gt;Edit&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;querySelector&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="gclid"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;value&lt;/SPAN&gt; = &lt;SPAN class=""&gt;getCookie&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"hubspot_gclid"&lt;/SPAN&gt;); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Use a &lt;STRONG&gt;custom bot action&lt;/STRONG&gt; that redirects to the form &lt;STRONG&gt;after capturing email&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;No API keys needed&lt;/STRONG&gt;, but it does require a form submission to update the contact.&lt;/P&gt;&lt;HR /&gt;&lt;H4&gt;&lt;STRONG&gt;Option B: Use the HubSpot Forms API or Contacts API&lt;/STRONG&gt;&lt;/H4&gt;&lt;P&gt;Once you have the visitor’s email (captured by the chatbot), use a &lt;STRONG&gt;custom JavaScript or server-side function&lt;/STRONG&gt; to update their contact record.&lt;/P&gt;&lt;P&gt;Example using HubSpot Forms API (client-side):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;hbspt.&lt;SPAN class=""&gt;forms&lt;/SPAN&gt;.&lt;SPAN class=""&gt;create&lt;/SPAN&gt;({ &lt;SPAN class=""&gt;portalId&lt;/SPAN&gt;: &lt;SPAN class=""&gt;'YOUR_PORTAL_ID'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;formId&lt;/SPAN&gt;: &lt;SPAN class=""&gt;'YOUR_FORM_ID'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;onFormReady&lt;/SPAN&gt;: &lt;SPAN class=""&gt;function&lt;/SPAN&gt;(&lt;SPAN class=""&gt;$form&lt;/SPAN&gt;) { $form.&lt;SPAN class=""&gt;find&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="email"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;val&lt;/SPAN&gt;(visitorEmail); $form.&lt;SPAN class=""&gt;find&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="gclid"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;val&lt;/SPAN&gt;(&lt;SPAN class=""&gt;getCookie&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"hubspot_gclid"&lt;/SPAN&gt;)); } });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Or use the &lt;STRONG&gt;Contacts API v3&lt;/STRONG&gt; from a backend server:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;PATCH /crm/v3/objects/contacts/{contactId} { "properties": { "gclid": "AW-xxxx" } }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;You’ll need a private app token for this.&lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;What You Can't Do:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;You &lt;STRONG&gt;cannot natively update contact properties like gclid from inside a HubSpot chatbot&lt;/STRONG&gt; alone.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Chatbots do not have access to cookies or URL params.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;They also &lt;STRONG&gt;don’t support direct property mutation logic&lt;/STRONG&gt; without routing through forms or custom API calls.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;Recommended Flow:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Visitor clicks ad with ?gclid=...&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;JavaScript stores gclid in a cookie.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Chatbot collects email → stores it in HubSpot.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You use either:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;A hidden field form submission, or&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;A background API call&lt;BR /&gt;→ to attach the gclid to the contact.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;Let me know if this helps, or if you have any other questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Was I able to help answer your question? Help the community by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;marking it as a solution.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.365535248041773%" height="191px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_0-1752589411006.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/150748i3E04D0A4140D542C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrandonWoodruff_0-1752589411006.jpeg" alt="BrandonWoodruff_0-1752589411006.jpeg" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="79.50391644908615%" height="191px"&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/brandon-woody-woodruff/" target="_blank" rel="noopener nofollow noreferrer"&gt;Brandon Woodruff&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;Senior Software Developer @&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.pearagon.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;Pearagon&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Still have questions? Reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:brandon@pearagon.com" target="_blank" rel="noopener nofollow noreferrer"&gt;brandon@pearagon.com&lt;/A&gt;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_1-1752589410938.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/150747iDF99E114432B8932/image-size/small?v=v2&amp;amp;px=200" role="button" title="BrandonWoodruff_1-1752589410938.png" alt="BrandonWoodruff_1-1752589410938.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jul 2025 14:24:20 GMT</pubDate>
    <dc:creator>BrandonWoodruff</dc:creator>
    <dc:date>2025-07-15T14:24:20Z</dc:date>
    <item>
      <title>Hubspot Chat Google Ads Click ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176228#M83208</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im looking for a way to set a contacts google ads click property from ad links through the hubspot chatbot.&lt;/P&gt;&lt;P&gt;I know i can access the gclid from the cookie and I cant find a way of setting it with the chatbot. I would need the contacts email address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 14:34:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176228#M83208</guid>
      <dc:creator>CHutt5</dc:creator>
      <dc:date>2025-07-14T14:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hubspot Chat Google Ads Click ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176387#M83218</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/554642"&gt;@CHutt5&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for reaching out to the Community!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to invite some community members who are subject matter experts to join this conversation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/945160"&gt;@BrandonWoodruff&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/931129"&gt;@DilionSmith&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&amp;nbsp;- Would you be able to share any insights on this? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your expertise would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;SPAN class="c-message__edited_label" data-sk="tooltip_parent"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="c-message__edited_label" data-sk="tooltip_parent"&gt;Victor&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 19:37:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176387#M83218</guid>
      <dc:creator>Victor_Becerra</dc:creator>
      <dc:date>2025-07-14T19:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hubspot Chat Google Ads Click ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176732#M83241</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the HubSpot chatbot does not natively support writing contact properties like gclid without custom development. However, here’s the &lt;STRONG&gt;technically correct and supported way to make this work&lt;/STRONG&gt;:&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;What You Can Do:&lt;/H3&gt;&lt;P&gt;&lt;STRONG&gt;1. Capture gclid using a cookie:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;HubSpot’s default tracking cookie (_hstc) &lt;STRONG&gt;does not store the gclid&lt;/STRONG&gt; by default.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You must &lt;STRONG&gt;create a custom script&lt;/STRONG&gt; on your website to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Read the gclid from the URL.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Store it in a first-party cookie like hubspot_gclid.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Pass the gclid to HubSpot via a form or tracking API:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;You’ll need to ensure the chatbot (conversational bot flow) includes an &lt;STRONG&gt;email capture&lt;/STRONG&gt; step.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Once you have the email, use one of two options to set the gclid:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;Two Technical Paths:&lt;/H3&gt;&lt;H4&gt;&lt;STRONG&gt;Option A: Use a Hidden Field in a Form&lt;/STRONG&gt;&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Add a hidden field for gclid in a HubSpot form.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Populate that hidden field via Javascript&amp;amp;colon;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;javascript&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Copy&lt;SPAN class=""&gt;Edit&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;querySelector&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="gclid"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;value&lt;/SPAN&gt; = &lt;SPAN class=""&gt;getCookie&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"hubspot_gclid"&lt;/SPAN&gt;); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Use a &lt;STRONG&gt;custom bot action&lt;/STRONG&gt; that redirects to the form &lt;STRONG&gt;after capturing email&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;No API keys needed&lt;/STRONG&gt;, but it does require a form submission to update the contact.&lt;/P&gt;&lt;HR /&gt;&lt;H4&gt;&lt;STRONG&gt;Option B: Use the HubSpot Forms API or Contacts API&lt;/STRONG&gt;&lt;/H4&gt;&lt;P&gt;Once you have the visitor’s email (captured by the chatbot), use a &lt;STRONG&gt;custom JavaScript or server-side function&lt;/STRONG&gt; to update their contact record.&lt;/P&gt;&lt;P&gt;Example using HubSpot Forms API (client-side):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;hbspt.&lt;SPAN class=""&gt;forms&lt;/SPAN&gt;.&lt;SPAN class=""&gt;create&lt;/SPAN&gt;({ &lt;SPAN class=""&gt;portalId&lt;/SPAN&gt;: &lt;SPAN class=""&gt;'YOUR_PORTAL_ID'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;formId&lt;/SPAN&gt;: &lt;SPAN class=""&gt;'YOUR_FORM_ID'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;onFormReady&lt;/SPAN&gt;: &lt;SPAN class=""&gt;function&lt;/SPAN&gt;(&lt;SPAN class=""&gt;$form&lt;/SPAN&gt;) { $form.&lt;SPAN class=""&gt;find&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="email"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;val&lt;/SPAN&gt;(visitorEmail); $form.&lt;SPAN class=""&gt;find&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'input[name="gclid"]'&lt;/SPAN&gt;).&lt;SPAN class=""&gt;val&lt;/SPAN&gt;(&lt;SPAN class=""&gt;getCookie&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"hubspot_gclid"&lt;/SPAN&gt;)); } });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Or use the &lt;STRONG&gt;Contacts API v3&lt;/STRONG&gt; from a backend server:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;PATCH /crm/v3/objects/contacts/{contactId} { "properties": { "gclid": "AW-xxxx" } }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;You’ll need a private app token for this.&lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;What You Can't Do:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;You &lt;STRONG&gt;cannot natively update contact properties like gclid from inside a HubSpot chatbot&lt;/STRONG&gt; alone.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Chatbots do not have access to cookies or URL params.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;They also &lt;STRONG&gt;don’t support direct property mutation logic&lt;/STRONG&gt; without routing through forms or custom API calls.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;Recommended Flow:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Visitor clicks ad with ?gclid=...&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;JavaScript stores gclid in a cookie.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Chatbot collects email → stores it in HubSpot.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You use either:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;A hidden field form submission, or&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;A background API call&lt;BR /&gt;→ to attach the gclid to the contact.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;Let me know if this helps, or if you have any other questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Was I able to help answer your question? Help the community by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;marking it as a solution.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.365535248041773%" height="191px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_0-1752589411006.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/150748i3E04D0A4140D542C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrandonWoodruff_0-1752589411006.jpeg" alt="BrandonWoodruff_0-1752589411006.jpeg" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="79.50391644908615%" height="191px"&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/brandon-woody-woodruff/" target="_blank" rel="noopener nofollow noreferrer"&gt;Brandon Woodruff&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;Senior Software Developer @&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.pearagon.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;Pearagon&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Still have questions? Reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:brandon@pearagon.com" target="_blank" rel="noopener nofollow noreferrer"&gt;brandon@pearagon.com&lt;/A&gt;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_1-1752589410938.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/150747iDF99E114432B8932/image-size/small?v=v2&amp;amp;px=200" role="button" title="BrandonWoodruff_1-1752589410938.png" alt="BrandonWoodruff_1-1752589410938.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 14:24:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176732#M83241</guid>
      <dc:creator>BrandonWoodruff</dc:creator>
      <dc:date>2025-07-15T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hubspot Chat Google Ads Click ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176799#M83249</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/945160"&gt;@BrandonWoodruff&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the prcoess and had started doing it alright, but I'm not sure how the chatbot gets access to the 'gclid' cookie in order to save it to the contact? The chatbot doesnt have access to the browser so thats the part im struggling with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 16:37:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Chat-Google-Ads-Click-ID/m-p/1176799#M83249</guid>
      <dc:creator>CHutt5</dc:creator>
      <dc:date>2025-07-15T16:37:21Z</dc:date>
    </item>
  </channel>
</rss>

