<?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: Linking HubSpot's trakcking to new contacts in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890924#M69600</link>
    <description>&lt;P&gt;Thanks! That makes sense (though so convoluted, urgh). Will give it a go and report back.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 08:52:33 GMT</pubDate>
    <dc:creator>alexander_sloan</dc:creator>
    <dc:date>2023-12-08T08:52:33Z</dc:date>
    <item>
      <title>Linking HubSpot's trakcking to new contacts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890417#M69575</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to be able to associate HubSpot's anonymous browsing data with Contacts created from the server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;HubSpot collects anonymous browising data which allows you to track where new leads/contacts came from. The unique ID for that appears to be &lt;FONT face="andale mono,times"&gt;hubspotutk&lt;/FONT&gt;&amp;nbsp;in the cookies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can't run HubSpot's identify on the clientside and therefore we create new contacts using the server side SDK (node.js) whenever someone signs up. I want to associate these two things so that we get the all the marketing/funnnel info inside HubSpot.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Ideally we would just add&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="andale mono,times"&gt;hubspotutk&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;as a property the to the contact create call we're already making, but that doesn't seem to be an option. Is there another way to accomplish the same thing?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 10:53:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890417#M69575</guid>
      <dc:creator>alexander_sloan</dc:creator>
      <dc:date>2023-12-07T10:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Linking HubSpot's trakcking to new contacts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890676#M69592</link>
      <description>&lt;P&gt;I believe you can only accomplish this with Marketing Hub Enterprise using the option to &lt;A href="https://developers.hubspot.com/docs/api/events/tracking-code#tracking-custom-behavioral-events-marketing-hub-enterprise-only-" target="_blank" rel="noopener"&gt;Track a Custom Behavioral Event&lt;/A&gt; using the&amp;nbsp;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;SPAN class=""&gt;/events/v3/send&lt;/SPAN&gt; &lt;A href="https://developers.hubspot.com/docs/api/analytics/events" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt; and including the utk and email as part of the body parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to successfully run that with a server-side process when I have both the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;hubspotutk&lt;/SPAN&gt;&lt;/FONT&gt; and the contact's email address, and it will create the contact associated to that anonymous visitor profile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My full process is this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Search for an existing contact with the email address.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_utk" target="_blank" rel="noopener"&gt;Get a contact by its user token&lt;/A&gt; using that legacy endpoint. I do that to check and see if that &lt;FONT face="courier new,courier"&gt;hubspotutk&lt;/FONT&gt; is associated to an existing contact with a different email address already.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.hubspot.com/docs/api/analytics/events" target="_blank" rel="noopener"&gt;Send Custom Behavioral Event&lt;/A&gt; with both the &lt;FONT face="courier new,courier"&gt;utk&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;email&lt;/FONT&gt; parameters included in the body.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 07 Dec 2023 18:35:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890676#M69592</guid>
      <dc:creator>cooperelias</dc:creator>
      <dc:date>2023-12-07T18:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Linking HubSpot's trakcking to new contacts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890924#M69600</link>
      <description>&lt;P&gt;Thanks! That makes sense (though so convoluted, urgh). Will give it a go and report back.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 08:52:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/890924#M69600</guid>
      <dc:creator>alexander_sloan</dc:creator>
      <dc:date>2023-12-08T08:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Linking HubSpot's trakcking to new contacts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/892398#M69666</link>
      <description>&lt;P&gt;Ended up submitting a custom form event from the server in order to create the Contact &lt;A href="https://legacydocs.hubspot.com/docs/methods/forms/submit_form_v3_authentication" target="_blank"&gt;Submit data for a form (Supporting Authentication) | Forms API&lt;/A&gt;&amp;nbsp;So the flow is:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. Grab the &lt;FONT face="andale mono,times"&gt;hubspotutk&lt;/FONT&gt; from the cookies&lt;/P&gt;&lt;P&gt;2. Check wether a contact with the hubspotutk already exists (&lt;FONT face="andale mono,times"&gt;data.is-token&lt;/FONT&gt;) at &lt;FONT face="andale mono,times"&gt;/contacts/v1/contact/utk/${hubspotutk}/profile&lt;/FONT&gt;.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3. If not a Contact, send a request to the above Forms API:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data: {&lt;BR /&gt;fields: [&lt;BR /&gt;{&lt;BR /&gt;objectTypeId: "0-1",&lt;BR /&gt;name: "email",&lt;BR /&gt;value: email&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;context: {&lt;BR /&gt;hutk: hubspotutk&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Now that the Contact exists, you can update as normal.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Dec 2023 09:28:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/892398#M69666</guid>
      <dc:creator>alexander_sloan</dc:creator>
      <dc:date>2023-12-12T09:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Linking HubSpot's trakcking to new contacts</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/892399#M69667</link>
      <description>&lt;P&gt;Didn't clock that that API is only available on Enterprise. Still seems like a better solution that where we ended, but the hint about looking up Contacts with the existing hubspotuk was &lt;span class="lia-unicode-emoji" title=":ok_hand:"&gt;👌&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 09:29:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-HubSpot-s-trakcking-to-new-contacts/m-p/892399#M69667</guid>
      <dc:creator>alexander_sloan</dc:creator>
      <dc:date>2023-12-12T09:29:39Z</dc:date>
    </item>
  </channel>
</rss>

