Issue with Form API

SOLVE
Highlighted
New Contributor

Hi there,

 

I'm submitting info to a hubspot form via the API. I've submitted the hs_context field, but page view tracking still isn't working. I'm not sure how to check if I've correctly submitted the hs_context and the hutk parameter.

 

Screen Shot 2019-05-14 at 7.30.39 PM.png

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
New Contributor

Thanks. We found the issue actually. We were not JSON encoding the hs_context parameter.

 

https://integrate.hubspot.com/t/not-able-to-track-page-views-from-my-site-on-contact-timeline-in-hub...

4 Replies
HubSpot Moderator

Welcome, @jfeng.

 

I can confirm that the hs_context did not come through successfully, but I unfortunately don't know of a way you can confirm other than observing the presence or absence of values for properties like First page seen.

 

Could you share the URL encoded request URL you are submitting? The v2 Forms API endpoint you are using doesn't accept raw JSON like the v3 Forms API endpoint, so I'd like to confirm that the hs_context object is encoded properly.

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
New Contributor

Thanks. We found the issue actually. We were not JSON encoding the hs_context parameter.

 

https://integrate.hubspot.com/t/not-able-to-track-page-views-from-my-site-on-contact-timeline-in-hub...

HubSpot Moderator

Glad to hear you found the solution, @jfeng!

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
HubSpot Moderator

Hey, again, @jfeng.

 

I forgot about this endpoint, which allows you to check whether the hutk value is associated with a contact record. You can use this to help confirm whether you're passing hs_context correctly.

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes