Source not correctly attributed to contacts via forms API


#1

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:

hs_context_hutk_
hs_context_ipaddress_
hs_context_pageurl_

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

Any ideas?


#2

Hi @Kyle

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

hs_context=%7B%22hutk%22%3A%2260c2ccdfe4892f0fa0593940b12c11aa%22%2C%22ipAddress%22%3A%22192.168.1.12%22%2C%22pageUrl%22%3A%22http%3A%2F%2Fdemo.hubapi.com%2Fcontact%2F%22%7D

and not

hs_context_hutk_=60c2ccdfe4892f0fa0593940b12c11aa&hs_context_ipaddress_=192.168.1.12& hs_context_pageurl_=http://demo.hubapi.com/contact/


#3

Thanks, @dadams.

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


#4

@dadams - any thoughts on this?


#5

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.


#6

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

Thanks for coming back to me so quickly.