APIs & Integrations

Tspesh1
Member

Tracking Pageviews of Form Loaded through an API call

SOLVE

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?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Tracking Pageviews of Form Loaded through an API call

SOLVE

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.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
4 Replies 4
IsaacTakushi
HubSpot Employee
HubSpot Employee

Tracking Pageviews of Form Loaded through an API call

SOLVE

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

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Tracking Pageviews of Form Loaded through an API call

SOLVE

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.

Isaac Takushi

Associate Certification Manager
0 Upvotes
rajan
Member

Tracking Pageviews of Form Loaded through an API call

SOLVE

Page view metric is not updating even after sending hutk value with submission. Screenshot 2021-07-16 at 5.57.20 PM.png

 

0 Upvotes
Tspesh1
Member

Tracking Pageviews of Form Loaded through an API call

SOLVE

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?

0 Upvotes