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 :
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.
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!
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!
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 😉