<?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 Gclid with auto hubspot parameters in Ads</title>
    <link>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/355408#M787</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using Hubspot and Google Ads together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hubspot added his paramaters like shown here:&amp;nbsp;&lt;A href="https://knowledge.hubspot.com/ads/ad-tracking-in-hubspot" target="_blank"&gt;https://knowledge.hubspot.com/ads/ad-tracking-in-hubspot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, by doing this, Hubspot is removing the default&amp;nbsp;Gclid param.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to keep the&amp;nbsp;Gclid on my ads?&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jul 2020 10:18:55 GMT</pubDate>
    <dc:creator>RobinSwapcard</dc:creator>
    <dc:date>2020-07-18T10:18:55Z</dc:date>
    <item>
      <title>Gclid with auto hubspot parameters</title>
      <link>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/355408#M787</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using Hubspot and Google Ads together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hubspot added his paramaters like shown here:&amp;nbsp;&lt;A href="https://knowledge.hubspot.com/ads/ad-tracking-in-hubspot" target="_blank"&gt;https://knowledge.hubspot.com/ads/ad-tracking-in-hubspot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, by doing this, Hubspot is removing the default&amp;nbsp;Gclid param.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to keep the&amp;nbsp;Gclid on my ads?&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 10:18:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/355408#M787</guid>
      <dc:creator>RobinSwapcard</dc:creator>
      <dc:date>2020-07-18T10:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Gclid with auto hubspot parameters</title>
      <link>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/355687#M788</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/8133"&gt;@RobinSwapcard&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently, the GCLID value from Google is not passed to Hubspot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your goal is to pass the GCLID value to Hubspot, it is possible to do via the cookie and using a hidden form field on your conversion form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This &lt;STRONG&gt;&lt;A href="https://zackphilipps.com/store-gclid-cookie-send-to-hubspot/" target="_blank" rel="nofollow noopener"&gt;external blog post describes&lt;/A&gt;&lt;/STRONG&gt; how to add the GCLID to your cookies via javascript and add it to your forms as a hidden field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was also able to find more about it in&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Gclid-tracking-via-cookie/m-p/224687#M3583" target="_blank" rel="noopener"&gt;this Community post here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly,&lt;/P&gt;
&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 15:23:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/355687#M788</guid>
      <dc:creator>PamCotton</dc:creator>
      <dc:date>2020-07-20T15:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Gclid with auto hubspot parameters</title>
      <link>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/764134#M1903</link>
      <description>&lt;P&gt;I figured out how to store and capture the GCLID using the code below in Tagmanager for contacts in Hubspot. However, I still need code to do the same thing for the MSCLKID (Microsoft Click ID for Microsoft Ads). If you know how to fix this problem, please paste the code for tagmanager in the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need help with storing the GCLID, paste the code below into tagmanager using all pages as the trigger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function getParam(p) {&lt;BR /&gt;var match = RegExp('[?&amp;amp;]' + p + '=([^&amp;amp;]*)').exec(window.location.search);&lt;BR /&gt;return match &amp;amp;&amp;amp; decodeURIComponent(match[1].replace(/\+/g, ' '));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function getExpiryRecord(value) {&lt;BR /&gt;var expiryPeriod = 90 * 24 * 60 * 60 * 1000; // 90 day expiry in milliseconds&lt;/P&gt;&lt;P&gt;var expiryDate = new Date().getTime() + expiryPeriod;&lt;BR /&gt;return {&lt;BR /&gt;value: value,&lt;BR /&gt;expiryDate: expiryDate&lt;BR /&gt;};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function addGclid() {&lt;BR /&gt;var gclidParam = getParam('gclid');&lt;BR /&gt;var gclidFormFields = ['gclid_field', 'foobar']; // all possible gclid form field ids here&lt;BR /&gt;var gclidRecord = null;&lt;BR /&gt;var currGclidFormField;&lt;/P&gt;&lt;P&gt;var gclsrcParam = getParam('gclsrc');&lt;BR /&gt;var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1;&lt;/P&gt;&lt;P&gt;gclidFormFields.forEach(function (field) {&lt;BR /&gt;if (document.getElementById(field)) {&lt;BR /&gt;currGclidFormField = document.getElementById(field);&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;if (gclidParam &amp;amp;&amp;amp; isGclsrcValid) {&lt;BR /&gt;gclidRecord = getExpiryRecord(gclidParam);&lt;BR /&gt;localStorage.setItem('gclid', JSON.stringify(gclidRecord));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid'));&lt;BR /&gt;var isGclidValid = gclid &amp;amp;&amp;amp; new Date().getTime() &amp;lt; gclid.expiryDate;&lt;/P&gt;&lt;P&gt;if (currGclidFormField &amp;amp;&amp;amp; isGclidValid) {&lt;BR /&gt;currGclidFormField.value = gclid.value;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;window.addEventListener('load', addGclid);&lt;/P&gt;&lt;P&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will also have to create a property in Hubspot called gclid and change it to hidden on your forms.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 05:41:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/764134#M1903</guid>
      <dc:creator>Danielle1</dc:creator>
      <dc:date>2023-03-04T05:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Gclid with auto hubspot parameters</title>
      <link>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/764677#M1909</link>
      <description>&lt;P&gt;Thanks for sharing&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/95725"&gt;@Danielle1&lt;/a&gt;!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 15:39:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Ads/Gclid-with-auto-hubspot-parameters/m-p/764677#M1909</guid>
      <dc:creator>MiaSrebrnjak</dc:creator>
      <dc:date>2023-03-06T15:39:58Z</dc:date>
    </item>
  </channel>
</rss>

