APIs & Integrations

ArnaudStephan
Participant

Get form submissions by source

SOLVE

Hello,

I'm currently using this endpoint to get data on our forms :

 
This allows me to get weekly analytics for all of our forms, but it is not grouped by source, like you can see in Hubspot directly :

Screenshot 2024-08-27 at 17.48.43.png

 

Is there a way to get this data from an endpoint ? The v3 API documentation does not seem to include the possibility, and I did not manage to find the correct way of doing it using the analytics v2 API.

I've tried a lot of different approaches while trying to build the correct URL to make the request to, but I've only been able to get analytics data grouped by form, and not form + source.
 
Thanks in advance 🙂
1 Accepted solution
GRajput
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Get form submissions by source

SOLVE

Hi @ArnaudStephan 

 

HubSpot's v2 Analytics API does provide some data on form submissions and other analytics. Still, its functionality is limited when it comes to breaking down analytics by specific sources (e.g., traffic source, original source, etc.) within the same API call.

As of now, HubSpot’s API documentation does not offer a straightforward way to directly fetch form analytics data grouped by source, as you see in the HubSpot dashboard.
Step 1: Get Form Submissions. Use the Forms API to retrieve submissions for a specific form.


Step 2: Fetch Contact Source Information For each contact from the list, use the Contacts API to get source information.


Step 3: Group Data by Source. Use your server-side language (Node.js, Python, etc.) to group this data by hs_analytics_source or any other relevant property.

 

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


View solution in original post

2 Replies 2
GRajput
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Get form submissions by source

SOLVE

Hi @ArnaudStephan 

 

HubSpot's v2 Analytics API does provide some data on form submissions and other analytics. Still, its functionality is limited when it comes to breaking down analytics by specific sources (e.g., traffic source, original source, etc.) within the same API call.

As of now, HubSpot’s API documentation does not offer a straightforward way to directly fetch form analytics data grouped by source, as you see in the HubSpot dashboard.
Step 1: Get Form Submissions. Use the Forms API to retrieve submissions for a specific form.


Step 2: Fetch Contact Source Information For each contact from the list, use the Contacts API to get source information.


Step 3: Group Data by Source. Use your server-side language (Node.js, Python, etc.) to group this data by hs_analytics_source or any other relevant property.

 

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


ArnaudStephan
Participant

Get form submissions by source

SOLVE

Hey Gaurav !

The problem with this solution is that it will only work with submissions, but not views. I guess I'll have to wait for a better version of the API to be able to do that 😉

Thanks anyway !

0 Upvotes