APIs & Integrations

brie
Member

Analytics API - Get Broken Down Data - By "Domain" Option

Hi There!

When in the HubSpot App in the Traffic Analytics Reporting area, under the "Sources" tab I can select specific Domains to filter the data.

Is it possible to Get Broken Down Data against each Domain, mirroring the in-app experience?

Get analytics data breakdowns

GET /analytics/v2/reports/:breakdown_by/:time_period - Get analytics data broken down by the specified category.

Thank you in advance!

0 Upvotes
4 Replies 4
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Analytics API - Get Broken Down Data - By "Domain" Option

Hi @brie,

It's not yet documented, but you can actually use the subdomain query parameter to filter by a specific domain. For example:

https://api.hubapi.com/analytics/v2/reports/:breakdown_by/:time_period?subdomain=www.subdomain.com
0 Upvotes
brie
Member

Analytics API - Get Broken Down Data - By "Domain" Option

Hi There - wanted to check in on this.

Can anyone provide some guidance?

Thank you!

0 Upvotes
kelseymcevoy
HubSpot Employee
HubSpot Employee

Analytics API - Get Broken Down Data - By "Domain" Option

Hi Brie,

Just to confirm you would like to see all the entrance URLs or "Domains" for the Direct traffic source? If so you can use this endpoint: https://api.hubapi.com/analytics/v2/reports/sources/total?hapikey=demo&start=20180101&end=20180301&d1=direct

This will break down your analytics by Sources and then further drill down (d1=direct) exclusively into the Direct Traffic Source.

Let me know if this is what you're looking for!

Kelsey

0 Upvotes
brie
Member

Analytics API - Get Broken Down Data - By "Domain" Option

Hi Kelsey!

So you're saying that the urls returned by source=direct is the same as if I were to use the "Domains" drop down on the main Analytics tab in your application?

When I use this drop down in HubSpot, I can see the source breakdown after I select a specific Domain in the upper left corner.

I'm wondering if we can get the Source breakdown for a specific Domain like in the application.

Feel free to email me if you want some sample screenshots :slight_smile:

Thanks!

0 Upvotes