GET
/
analytics
/
v2
/
reports
/
{breakdown_by}
/
{time_period}
Get analytics data breakdowns
curl --request GET \
  --url https://api.hubapi.com/analytics/v2/reports/{breakdown_by}/{time_period} \
  --header 'Authorization: Bearer <token>'
{
  "offset": 123,
  "total": 123,
  "totals": {
    "rawViews": 123,
    "visits": 123,
    "visitors": 123,
    "leads": 123,
    "contacts": 123,
    "subscribers": 123,
    "marketingQualifiedLeads": 123,
    "salesQualifiedLeads": 123,
    "opportunities": 123,
    "customers": 123,
    "pageviewsPerSession": 123,
    "bounceRate": 123,
    "timePerSession": 123,
    "newVisitorSessionRate": 123,
    "sessionToContactRate": 123,
    "contactToCustomerRate": 123,
    "ctaViews": 123,
    "submissions": 123,
    "entrances": 123,
    "exits": 123,
    "timePerPageview": 123,
    "pageBounceRate": 123,
    "exitsPerPageview": 123
  },
  "breakdowns": [
    {
      "rawViews": 123,
      "visits": 123,
      "visitors": 123,
      "leads": 123,
      "contacts": 123,
      "subscribers": 123,
      "marketingQualifiedLeads": 123,
      "salesQualifiedLeads": 123,
      "opportunities": 123,
      "customers": 123,
      "pageviewsPerSession": 123,
      "bounceRate": 123,
      "timePerSession": 123,
      "newVisitorSessionRate": 123,
      "sessionToContactRate": 123,
      "contactToCustomerRate": 123,
      "ctaViews": 123,
      "submissions": 123,
      "entrances": 123,
      "exits": 123,
      "timePerPageview": 123,
      "pageBounceRate": 123,
      "exitsPerPageview": 123,
      "breakdown": "<string>",
      "meta": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

breakdown_by
enum<string>
required

The category used to break down the analytics data.

Available options:
totals,
sessions,
sources,
geolocation,
utm-campaigns,
utm-contents,
utm-mediums,
utm-sources,
utm-terms
time_period
enum<string>
required

The time period used to group the data.

Available options:
total,
daily,
weekly,
monthly,
summarize/daily,
summarize/weekly,
summarize/monthly

Query Parameters

start
string
required

The start date for the data you want. Must be included as ISO 8601 format, YYYYMMDD.

end
string
required

The end date for the data you want. Must be included as ISO 8601 format, YYYYMMDD.

d1
string

Used to drilldown into the data.

d2
string

Used to further drill down into the data.

f
string[]

Filter the returned data to include only the specified breakdown. May be included multiple times.

e
string[]

Exclude data for the specified breakdown. May be included multiple times.

filterId
integer

The ID of an Analytics view.

sort
string

If included, the results are sorted by the specified field.

sortDir
enum<string>
default:DESC

Controls the direction of sorted results.

Available options:
ASC,
DESC
limit
integer
default:350

Used to limit the number of results per request.

offset
integer

Used to get the next page of results.

Response

200
application/json

Analytics data retrieved successfully

The response is of type object.