Tracking Pageviews of Form Loaded through an API call


#1

The HubSpot embed codes are great in that they are super easy but they do cause some inconsistencies in our CSS/Markup and we also have some other things we like to intercept and track via some API's we're building out.

Long story short, rather than using the embed code, we're using the HubSpot API to pull in form fields and submit users to those forms through the API. The one thing I'm concerned about here though is the loss of conversion tracking inside of HubSpot on the forms.

Is there any way to "log" a pageview on the forms through the API? Does merely getting the form from the API do this?


Custom form tracking
#3

Hi @Tspesh,

To confirm, are you referring to logging form views through the API, as highlighted in this screenshot?

If so, this metric is only tracked when a HubSpot form embed code is fired, so submissions made through the API does not affect it. See this similar topic.

That said, including the hutk cookie token value in the hs_context property for the v2 Forms API or in the context object for the v3 Forms API will populate page views on the contact record.


#4

To confirm, are you referring to logging form views through the API, as highlighted in this screenshot?

Yes. Presumably you need to track that to track submission rate?


#5

That's correct, @Tspesh. The submission rate is equal to the (submissions รท views) * 100.