<?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: How have you handled the HS user token on initial page load? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331623#M32129</link>
    <description>&lt;P&gt;Thanks for the response. We've actualy solved the issue using a combination of PHP and jQuery. To answer your question, we are populating a hidden form field in an external form.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What we did was check for the existence of the cookie in PHP and if it is not set yet we load some javascript. The javascript waits for the DOM to fully load and then checks for the cookie and then sets the value of the hidden form field.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2020 13:22:39 GMT</pubDate>
    <dc:creator>gmanning</dc:creator>
    <dc:date>2020-04-15T13:22:39Z</dc:date>
    <item>
      <title>How have you handled the HS user token on initial page load?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331321#M32078</link>
      <description>&lt;P&gt;About 10% of our traffic lands directly on a form page. Because the Hubspot user token isn't available until after PHP (Wordpress) has generated the page, the hutk value isn't available to embed as a hidden value in our form. The other 90% of the time we have success passing this.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We're using a workaround for now I'm not happy with. Testing with PHP for the existance of the cookie and if it doesn't exist using jQuery to refresh the page after 2000 ms. This works the first time, most of the time but sometimes requires two refreshes. I know this is not optimal.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We're wondering what have other people done to get around this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 12:36:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331321#M32078</guid>
      <dc:creator>gmanning</dc:creator>
      <dc:date>2020-04-14T12:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: How have you handled the HS user token on initial page load?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331508#M32110</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/117236"&gt;@gmanning&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To clarify, are you looking to populate the HubSpot utk value on a HubSpot form field/external form field?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 02:20:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331508#M32110</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-04-15T02:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How have you handled the HS user token on initial page load?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331623#M32129</link>
      <description>&lt;P&gt;Thanks for the response. We've actualy solved the issue using a combination of PHP and jQuery. To answer your question, we are populating a hidden form field in an external form.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What we did was check for the existence of the cookie in PHP and if it is not set yet we load some javascript. The javascript waits for the DOM to fully load and then checks for the cookie and then sets the value of the hidden form field.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 13:22:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-have-you-handled-the-HS-user-token-on-initial-page-load/m-p/331623#M32129</guid>
      <dc:creator>gmanning</dc:creator>
      <dc:date>2020-04-15T13:22:39Z</dc:date>
    </item>
  </channel>
</rss>

