Source not correctly attributed to contacts via forms API


Hi there!

I’m using the forms API to send contacts from our server to Hubspot. All contacts are being marked as “direct traffic” but this can’t be correct.

We are passing:


Which I believe should allows us to bucket the visits properly, as well as providing web analytics info.

Any ideas?


Hi @Kyle

The hs_context data needs to be passed as a single JSON encoded field, so you’d need:

and not

hs_context_hutk_=60c2ccdfe4892f0fa0593940b12c11aa&hs_context_ipaddress_= hs_context_pageurl_=


Thanks, @dadams.

I can no longer see the hs_context fields in the Hubspot contact. Is this normal?


@dadams - any thoughts on this?


The hs_context data isn’t considered to be a form field, so you should not see any of the data in hs_context in the submission or as properties in the contact.


Okay, cool. I’ll get it live and see if the source info starts coming through.

Thanks for coming back to me so quickly.