Landing page not tracking submission via Forms API


I am using the Forms API to submit a form on a HubSpot page.

I believe I’m submitting all of the suggested tracking data, and the form submission shows up correctly on the Contact record (with the title of the landing page it was submitted on). However, it does not seem to be registering as a submission for the landing page.

Is this the expected behavior? Any way to get it to register as a submission for the landing page?

Example payload to Forms API:
DATA TYPE: application/x-www-form-urlencoded
BODY: infinity_vid=abea4010-fake-fake-9c0c-7bd298fd7e6f&zip=10009&system_type=system_type_takeover&has_smartphone=has_smartphone_true&feature_interest=feature_interest_enviro%3Bfeature_interest_video&protection_interest=protection_interest_pets&property_type=property_type_rental&firstname=Test&lastname=User&±+LF+QA%22%7D

What I see on the contact, and on the landing page:

API submission with conversion page recorded
Form API Campaign Tracking
Form API submission doesn't populate page statistics

Hi @parkeristyping

You can include the pageId parameter in hs_context to count the submission towards the HubSpot page. The pageId needs to be the content ID of the page you’re working with.


Cool. Thanks for the quick reply @dadams!


Actually quick follow-up @dadams. A or B?

A: “pageId”: "12345"
B: “pageId”: 12345

Form submission via API causing issues

The ID should be a number, so B: "pageId": 12345


Hi @dadams

We’re experiencing a similar problem, and we want to try and implement this as a fix. However, we’re not sure how to find the “content ID” that you’ve referenced. If the pageID needs to be the content ID, where do we find / get the Content ID? Thanks.


‘{{ content_id }}’ did it for me.

You can also just edit the page and it will be the ID in the URL.


Great, we’ll take a look, thanks.


Hi @dadams–Do we need to make these pages using the Hubspot CMS in order to track form submissions via custom forms? How would you recommend doing form tracking in Hubspot campaigns if we’re using a custom form? (see