web-analytics

Counts page views

Changed on

Counts the number of page views on a project (production only), since Web Analytics was enabled. Results can be filtered on supported dimensions.

get/v1/query/web-analytics/visits/count

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v1/query/web-analytics/visits/count
  • Auth: HTTP bearer

Query parameters

projectIdstring required

The project identifier or the project name

Example:prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA
number
OR
string
number
OR
string
filterstring

OData-compliant filter. Encode the value when sending it in a URL.

Allows filtering on one or multiple dimensions.

Supported dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm.

JSON dimensions filtered by key: flags/<name>, for example flags/beta_banner eq 'true'. Wrap keys containing characters other than letters, digits, and underscores in single quotes, for example flags/'my-flag' eq 'true'.

Supported operations include eq, ne, in, and logical operators and, or, not with parentheses. Functions such as startswith are supported by the OData parser.

Example:route eq '/home'
teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Response

versionnumber required

Changes

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • warning

      for the query request parameter filter, the maxLength was set to 2048