<?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: Send event from hubspot to google analytics also set form field when google anlaytics cookie is in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/370594#M36484</link>
    <description>&lt;P&gt;&lt;BR /&gt;We have just created a HubSpot APP called Analytics Amplifier that helps you do this + push offline events to Google Analytics when they happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check it out here:&lt;BR /&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008" target="_blank"&gt;https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 21:48:56 GMT</pubDate>
    <dc:creator>ralphioooo</dc:creator>
    <dc:date>2020-09-15T21:48:56Z</dc:date>
    <item>
      <title>Send event from hubspot to google analytics also set form field when google anlaytics cookie is set</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/277587#M25349</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/665"&gt;@IsaacTakushi&lt;/a&gt;&amp;nbsp; dear i am facing another problem in hubspot.How to send Events from hubspot to Google Analytics.. I want to set Form field if google analytics cookie is set.I embeded js code on form and add that form on landing page but it do not set form field(google_client_id) when i fill the form on landing page..can you solve this problem.please review my code.&lt;/P&gt;&lt;P class="intercom-align-left"&gt;In all Hubspot forms add "GA Client id" as an optional hidden field&lt;BR /&gt;Modify the script tag on all Hubspot forms to set ga_client_id if the GA cookie is set&lt;/P&gt;&lt;P class="intercom-align-left"&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;&amp;nbsp;function setGaClientId() {&lt;BR /&gt;&amp;nbsp;if ($('[name=ga_client_id]')[0]) {&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$('[name=ga_client_id]').val(_((Cookies.get('_ga') || '').split('.')).takeRight(2).join('.'));&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;hbspt.forms.create({ &amp;nbsp;&lt;BR /&gt;&amp;nbsp;css: '',&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;portalId: '',&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;formId: '',&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;onFormSubmit: setGaClientId&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;});&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;..Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 12:16:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/277587#M25349</guid>
      <dc:creator>zohaib</dc:creator>
      <dc:date>2019-06-27T12:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/278181#M25430</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92908"&gt;@zohaib&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for the delayed response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With a&amp;nbsp;&lt;EM&gt;Marketing Basic&lt;/EM&gt; (legacy),&amp;nbsp;&lt;EM&gt;Professional&lt;/EM&gt;, or&amp;nbsp;&lt;EM&gt;Enterprise&lt;/EM&gt; subscription, you can use &lt;A href="https://developers.hubspot.com/docs/methods/forms/advanced_form_options" target="_self"&gt;these options&lt;/A&gt; to manipulate form field values with jQuery.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, I used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;script&amp;gt;
  var ga_client_id = "myValue";
  hbspt.forms.create({
        portalId: "",
	formId: "",
        onFormSubmit: function($form, ctx){&lt;BR /&gt;              $('input[name="ga_client_id"]').val(ga_client_id).change();   
   	}
  });
&amp;lt;/script&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Form field manipulation is not possible with a&amp;nbsp;&lt;EM&gt;Marketing Starter&lt;/EM&gt; or&amp;nbsp;&lt;EM&gt;Free&lt;/EM&gt; subscription, however, as these forms render in an &lt;CODE&gt;iframe&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, you can &lt;A href="https://knowledge.hubspot.com/articles/kcs_article/forms/can-i-auto-populate-form-fields-through-a-query-string" target="_self"&gt;auto-populate form fields with query strings&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 13:07:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/278181#M25430</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2020-02-18T13:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/278540#M25490</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92908"&gt;@zohaib&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To clarify, &lt;A href="https://help.funnel.io/en/articles/29042-tracking-hubspot-events-with-google-analytics" target="_self"&gt;this approach&lt;/A&gt;&amp;nbsp;to populating a Google Analytics client ID — which you discuss with&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66274"&gt;@WendyGoh&lt;/a&gt;&amp;nbsp;in &lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Hubspot-event-send-to-google-Analytics/m-p/278031/highlight/false#M25415" target="_self"&gt;this thread&lt;/A&gt;&amp;nbsp;—&amp;nbsp;&lt;EM&gt;will&lt;/EM&gt; work for a&amp;nbsp;&lt;EM&gt;Marketing Basic&lt;/EM&gt;,&amp;nbsp;&lt;EM&gt;Professional&lt;/EM&gt;, or&amp;nbsp;&lt;EM&gt;Enterprise&lt;/EM&gt; form, but&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt; for a&amp;nbsp;&lt;EM&gt;Marketing Free&lt;/EM&gt; or&amp;nbsp;&lt;EM&gt;Starter&lt;/EM&gt; form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Marketing Free&lt;/EM&gt; and &lt;EM&gt;Starter&lt;/EM&gt; forms are rendered in an &lt;CODE&gt;iframe&lt;/CODE&gt; through&amp;nbsp;&lt;CODE&gt;js.hsforms.net/forms/shell.js&lt;/CODE&gt; instead of&amp;nbsp;&lt;CODE&gt;js.hsforms.net/forms/v2.js&lt;/CODE&gt;, so they cannot be manipulated with jQuery or styled with on-page CSS.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 01:33:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/278540#M25490</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-07-03T01:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/319372#M30667</link>
      <description>&lt;P&gt;Hi Isaac,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to track conversions on google analytics based on hubspot form submissions on our website . I used the script you suggested:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;var ga_client_id = "myValue";&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;portalId: ",&lt;BR /&gt;formId: ",&lt;BR /&gt;onFormSubmit: function($form, ctx){&lt;BR /&gt;$('input[name="ga_client_id"]').val(ga-client_id).change();&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it doesn't seem to work.&amp;nbsp; I have tried to use onFormReady instead of onFormSubmit, but doesn't work either.&amp;nbsp; Any suggestions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;is hyphen highlighted in red -&amp;gt;&amp;nbsp; &amp;nbsp;&lt;EM&gt;$('input[name="ga_client_id"]').val(ga&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/FONT&gt;client_id).change(); &lt;/EM&gt;supposed to be an underscore?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 16:00:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/319372#M30667</guid>
      <dc:creator>PierreDrouzine</dc:creator>
      <dc:date>2020-02-14T16:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/319924#M30743</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/120407"&gt;@PierreDrouzine&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I mistyped the variable name as&amp;nbsp;&lt;CODE&gt;ga-client_id&lt;/CODE&gt;. It should be &lt;CODE&gt;ga_client_id&lt;/CODE&gt;. I've corrected my previous post. Thanks for pointing that out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you share an example page where you've implemented this script? Can you also confirm you're loading jQuery on the page?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 13:11:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/319924#M30743</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2020-02-18T13:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/370594#M36484</link>
      <description>&lt;P&gt;&lt;BR /&gt;We have just created a HubSpot APP called Analytics Amplifier that helps you do this + push offline events to Google Analytics when they happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check it out here:&lt;BR /&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008" target="_blank"&gt;https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 21:48:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/370594#M36484</guid>
      <dc:creator>ralphioooo</dc:creator>
      <dc:date>2020-09-15T21:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Send event from hubspot to google analytics also set form field when google anlaytics cookie is</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/370645#M36493</link>
      <description>&lt;P&gt;We have just created a HubSpot APP called Analytics Amplifier that helps you do this + push offline events to Google Analytics when they happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check it out here:&lt;BR /&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008" target="_blank"&gt;https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 03:14:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-event-from-hubspot-to-google-analytics-also-set-form-field/m-p/370645#M36493</guid>
      <dc:creator>ralphioooo</dc:creator>
      <dc:date>2020-09-16T03:14:14Z</dc:date>
    </item>
  </channel>
</rss>

