<?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 Getting value from browser when executing workflow in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/819862#M1634</link>
    <description>&lt;P&gt;I am pretty new to Hubspot but have a couple of workflows working. This one has defeated me though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added Amplitude tracking in Hubspot. This generates an ID to uniquely identify the user in the CMS. This ID is generated and sent to Amplitude while the user is anonymous. This works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a new contact is added, I think I need to execute a workflow in order to call my backend. Using this approach I know the Contact ID but I don't know how to access the Amplitude ID, as it is only available via a function call in the browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simple strategy I am missing here? Hope it's clear enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freddy&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2023 06:36:56 GMT</pubDate>
    <dc:creator>FMay</dc:creator>
    <dc:date>2023-07-14T06:36:56Z</dc:date>
    <item>
      <title>Getting value from browser when executing workflow</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/819862#M1634</link>
      <description>&lt;P&gt;I am pretty new to Hubspot but have a couple of workflows working. This one has defeated me though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added Amplitude tracking in Hubspot. This generates an ID to uniquely identify the user in the CMS. This ID is generated and sent to Amplitude while the user is anonymous. This works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a new contact is added, I think I need to execute a workflow in order to call my backend. Using this approach I know the Contact ID but I don't know how to access the Amplitude ID, as it is only available via a function call in the browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simple strategy I am missing here? Hope it's clear enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freddy&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 06:36:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/819862#M1634</guid>
      <dc:creator>FMay</dc:creator>
      <dc:date>2023-07-14T06:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from browser when executing workflow</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/819972#M1635</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/598888"&gt;@FMay&lt;/a&gt;&amp;nbsp;HubSpot doesn't "connect" to a visitors browser, meaning there's no way to retroactively have a system go back to the browser and grab more data. When a form is submit by a contact the form simply sends a cookie with the tracking information to HubSpot and it processes the analytics tracking. Data outside this isn't captured, it would need to be sent to HubSpot or another storage system at some point in order to be captured.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing you could do is add a &lt;A href="https://knowledge.hubspot.com/forms/pass-contact-property-values-with-hidden-form-fields" target="_blank" rel="noopener"&gt;hidden field&lt;/A&gt; to your HubSpot form to store the amplitude ID for the contact in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would then however need a script to grab the amplitude ID and pass it to that hidden form field, this would require some custom JS development. There's some guides on passing values to fields via JS. There's another post about how to set a value with &lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Embedded-Form-submission-amp-redirect-URL-based-on-form/m-p/287190" target="_blank" rel="noopener"&gt;custom JS available here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you'll need something to actually capture the value itself from amplitude.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's also a pre-built Amplitude HubSpot integration which might be useful to you!&amp;nbsp;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/amplitude-engage" target="_blank"&gt;https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/amplitude-engage&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only other option would be to create a script that automatically stores the amplitude information somewhere you always have access to, you'll then need to call that data through a webhook or custom code within your workflow.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:16:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/819972#M1635</guid>
      <dc:creator>TomM2</dc:creator>
      <dc:date>2023-07-14T11:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from browser when executing workflow</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/820308#M1639</link>
      <description>&lt;P&gt;Thanks Tom. All very useful information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the end I solved the problem by including a script in the footer that checks if I have already sent the User ID (got using simple Hubl inject) to amplitude by writing to&amp;nbsp; localstorage. If not in localstorage, it sends it. If it is, then it ignores.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Amplitude integration doesn't really do what I need across the board as it happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me in any case. Been a steep but pretty enjoyable learning curve!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freddy&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 07:08:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/820308#M1639</guid>
      <dc:creator>FMay</dc:creator>
      <dc:date>2023-07-15T07:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from browser when executing workflow</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/820701#M1640</link>
      <description>&lt;P&gt;Oh fair play! That does sound like a bit of a learning curve alright! Happy I could help somewhat!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 10:32:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/820701#M1640</guid>
      <dc:creator>TomM2</dc:creator>
      <dc:date>2023-07-17T10:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value from browser when executing workflow</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/1208944#M3229</link>
      <description>&lt;P data-start="0" data-end="11"&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/598888"&gt;@FMay&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="13" data-end="327"&gt;That’s a clever workaround with localStorage, nice thinking.&lt;/P&gt;
&lt;P data-start="13" data-end="327"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="13" data-end="327"&gt;The key limitation you hit is that workflows in HubSpot run server-side, with no access to browser context or JavaScript variables. So you can’t “pull” a value like the Amplitude user ID into a workflow unless it’s first stored in a HubSpot property.&lt;/P&gt;
&lt;P data-start="13" data-end="327"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="329" data-end="877"&gt;The cleanest native approach is still to capture the Amplitude ID client-side and push it into a hidden field in your HubSpot form before submission (&lt;A href="https://knowledge.hubspot.com/forms/create-and-edit-forms" target="_blank"&gt;https://knowledge.hubspot.com/forms/create-and-edit-forms&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="329" data-end="877"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="329" data-end="877"&gt;&amp;nbsp;That way, it becomes part of the contact record and is available for workflows, APIs, or any backend process. If your setup relies on custom events instead of forms, you could also use the HubSpot Forms API or Tracking Code API to send the ID programmatically&amp;nbsp;&lt;/P&gt;
&lt;P data-start="329" data-end="877"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="879" data-end="1230" data-is-last-node="" data-is-only-node=""&gt;If your goal later expands to syncing this identifier across Amplitude, HubSpot, and your backend in real time, a two-way sync layer can help. It keeps contact and event IDs consistent across all systems without relying on browser scripts. Stacksync handles this type of cross-system alignment automatically so user tracking stays coherent end-to-end.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 21:08:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Getting-value-from-browser-when-executing-workflow/m-p/1208944#M3229</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-10-06T21:08:29Z</dc:date>
    </item>
  </channel>
</rss>

