APIs & SDKs

Aggregates page views
Vercel SDK

Counts pageviews on a project, within the requested date range. Results are either aggregated or broken down over time. Results can additionally be broken down by one dimension, and filtered by multiple dimensions.
Aggregates page views
GEThttps://api.vercel.com/v1/query/web-analytics/visits/aggregate
Authentication
AuthorizationbearerToken
projectId
The project identifier or the project name
string
by
Required
Other dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm.
array
Up to two dimensions used to break down results.
Required
At most one time granularity is allowed: hour, day, week, month, year.
Default authentication mechanism
JSON dimensions: flags. Used bare, it breaks down results by key, for example flags returns one group per flag name. With a key, it breaks down results by that key's value, for example flags/beta_banner. Wrap keys containing characters other than letters, digits, and underscores in single quotes, for example flags/'my-flag'.
since
any
until
any
Required
Required
Timestamp in milliseconds, or a valid Date string.
Selects data until (including) this date. Will be adjusted according to the desired time granularity.
limit
integer
Optional
Number of distinct results, default to 10. Other results are grouped into "Others" group.
Timestamp in milliseconds, or a valid Date string.
Selects data from (including) this date and time. Will be adjusted according to the desired time granularity.
filter
OData-compliant filter. Encode the value when sending it in a URL.
teamId
The Team identifier to perform the request on behalf of.
Optional
Allows filtering on one or multiple dimensions. By default, filters for production environment only.
string
Supported dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm.
string
slug
Optional
Optional
The Team slug to perform the request on behalf of.
Supported operations include eq, ne, in, and logical operators and, or, not with parentheses. Functions such as startswith are supported by the OData parser.
This page is not in the current cross-link map.