APIs & Integrations

jawadfazal
Member

How to get Forms, Tracking/Website and Landipages stats from the API?

SOLVE

Hi,

I want to integrate stats for Forms,  Tracking/Website and Landpages. 

For example conversions, views etc. 

I am not able to find information in the documentation  regarding which endpoints I should be using for it.

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

How to get Forms, Tracking/Website and Landipages stats from the API?

SOLVE

Hi @jawadfazal 

 

No, the endpoint here would provide this. The Get Analytics data for specific objects is designed around how report data would be shown in the sources report. 

 

For a specific form, you'd be looking at the following request:

Get a daily breakdown for a specific form (with guid '7ca1364a-500a-4581-a677-29301f402ef2'):
https://api.hubapi.com/analytics/v2/reports/forms/daily?hapikey=demo&start=20180101&end=20180301&f=7ca1364a-500a-4581-a677-29301f402ef2

For all forms, you'd be looking at:

https://api.hubapi.com/analytics/v2/reports/forms/total?hapikey=demo&start=20180101&end=20180301

I hope this helps!

Product Manager @ HubSpot

View solution in original post

0 Upvotes
3 Replies 3
Willson
HubSpot Employee
HubSpot Employee

How to get Forms, Tracking/Website and Landipages stats from the API?

SOLVE

Hi @jawadfazal 

 

You should be able to use the following endpoints to retrieve the data you're after:

  1. Get analytics data for HubSpot hosted content
    1. You can find the Analytics Overview here.
  2. Get submissions for a form
    1. You can find the Forms API Overview here.

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
jawadfazal
Member

How to get Forms, Tracking/Website and Landipages stats from the API?

SOLVE

Hi @Willson ,

Thanks for the quick reply.

For Forms I would like to get total aggregated stats for all forms like I see in the following dashboard. Is it possible with the endpoint you mentioned?

hubspot_form.png 

I guess for Analytics, I would need an Analytics account?

0 Upvotes
Willson
Solution
HubSpot Employee
HubSpot Employee

How to get Forms, Tracking/Website and Landipages stats from the API?

SOLVE

Hi @jawadfazal 

 

No, the endpoint here would provide this. The Get Analytics data for specific objects is designed around how report data would be shown in the sources report. 

 

For a specific form, you'd be looking at the following request:

Get a daily breakdown for a specific form (with guid '7ca1364a-500a-4581-a677-29301f402ef2'):
https://api.hubapi.com/analytics/v2/reports/forms/daily?hapikey=demo&start=20180101&end=20180301&f=7ca1364a-500a-4581-a677-29301f402ef2

For all forms, you'd be looking at:

https://api.hubapi.com/analytics/v2/reports/forms/total?hapikey=demo&start=20180101&end=20180301

I hope this helps!

Product Manager @ HubSpot
0 Upvotes