Contact's analytics information is not being updated properly



What I have done already :

  • Embedded the tracker js file into the webpage, which generates the cookie for hutk
  • Took the generated hutk and pass it to the back end with some form data
  • Submit the form data with the form fields and the hs_context object
  • hs_context looks like this :
    "hs_context" : { "hutk": "60c2ccdfe4892f0fa0593940b12c11aa", "ipAddress": "" }

The contacts that get created when the form submits have all the information except the analytics information.

Am I doing something wrong, please advise.


Hi @thanks821,

Can you send me a link to an example contact?


I have fixed this issue myself. It seems like the hs_context value MUST be of string type but json formatted. In my code I was passing in the whole body as a ordered dictionary which requests handled fine and the data was successfully submitted. Even showed up properly on hubspot. However, only the hs_context value was not being submitted, it had to be type of string with the format of a json--not a ordered dictionary.