Submit data to a form via API and track form views



you wrote at Oct 10, 2016 3:50 pm

If you’re using the Forms API to send HubSpot form data, we’ll record submissions but we don’t have a way to record form views. At the moment we’ll only record views to the form if you’re using the form embed code.

Do you have any ability to track form view since this comment?

Tracking Pageviews of Form Loaded through an API call
Submission rates issue

Hi @Nikita_Voloshin,

No, this still isn’t possible. When using the forms API the actual form is a custom HTML form of your own creation, which doesn’t include the view tracking that HubSpot embedded forms do.


Ok, I see.
If I will use this embed code only for tracking:
portalId: ‘2638225’,
formId: ‘r5dgVb34-fsBg-541f-b769-480g5hfbhjfj’
Do this script have properties to disable generate html form (e.g. doNotGenerateHtmlPlease: true)?


Hi @Nikita_Voloshin,

There’s no built-in functionality to prevent the forms embed code from rendering the form. However, form views are tracked based on the embed code firing, so what you might consider is rendering the form in a div that you then set to display: none or something similar.