<?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: Traffic Source is Incorrect for API Form post in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Traffic-Source-is-Incorrect-for-API-Form-post/m-p/226280#M5176</link>
    <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/dadams"&gt;@dadams&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for answering.  My Dictionary variable is called hsContext as shown on &lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form" rel="nofollow noopener"&gt;https://developers.hubspot.com/docs/methods/forms/submit_form&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Dictionary&amp;lt;string, string&amp;gt; hsContext = new Dictionary&amp;lt;string, string&amp;gt;();&lt;BR /&gt;
hsContext.Add(“hutk”, strHubSpotUTK);&lt;BR /&gt;
hsContext.Add(“ipAddress”, strIpAddress);&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;but I post it as “hs_context”&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;// Append HS Context JSON
strPostData += "hs_context=" + Server.UrlEncode(strHubSpotContextJSON);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Edit:&lt;BR /&gt;
Here’s the hs_context post data (was on localhost):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;“{“hutk”:“561f2e1ae22989c634d6815f88298463”,“ipAddress”:”::1"}"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;and the StrPostData value looks like this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;“firstname=Garrett&amp;amp;lastname=K&amp;amp;email=test%&lt;A href="http://40pacbell.net" rel="nofollow noopener"&gt;40pacbell.net&lt;/A&gt;&amp;amp;phone=(555)+555-5555&amp;amp;eye_exam=Yes&amp;amp;contact_lenses_exam=&amp;amp;store_try_on=&amp;amp;insurance=Yes&amp;amp;appointment_location=TestStore1&amp;amp;appointment_date=5%2f31%2f2017+9%3a00%3a00+AM&amp;amp;hs_context=%7b%22hutk%22%3a%22561f2e1ae22989c634d6815f88298463%22%2c%22ipAddress%22%3a%22%3a%3a1%22%7d”&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 03 May 2017 21:37:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-05-03T21:37:17Z</dc:date>
  </channel>
</rss>

