Best way to associate traffic source to contact added through the API

New Member

We currently have a process to add any user who registers on our site as a contact in HubSpot using the Contacts API. No problem with that it works. But when we look up the new contacts added in Hubspot they show in the history as “Created from offline sources” and the field “Original source” shows the same.
Ideally, we’d love for those contacts to have the source prior to registration so that when looking at the Sources report, we can see the number of those contacts coming from various sources (
Is there a way we can associate the contact being created via the API to the visitor already being tracked by HubSpot through the JS tag?

1 Reply 1
Community Manager

Hi @convetit,

There is absolutely a way to associate a contact to the information we are tracking, that would be the Forms API The key is the hs_context JSON block, which contains the user’s cookie that the HubSpot JS tag is dropping/keeping tracking of.

Let me know if you have any issues with that.