pageview_aggregates
Creates, updates, deletes, gets or lists a pageview_aggregates resource.
Overview
| Name | pageview_aggregates |
| Type | Resource |
| Id | vercel.web_analytics.pageview_aggregates |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
ai_gateway_model_id | string | (wire: aiGatewayModelId) |
asn_id | string | (wire: asnId) |
deployment_id | string | (wire: deploymentId) |
entry_id | string | (wire: entryId) |
entry_item_id | string | (wire: entryItemId) |
environment_id | string | (wire: environmentId) |
generation_id | string | (wire: generationId) |
key_id | string | (wire: keyId) |
message_id | string | (wire: messageId) |
microfrontends_default_app_deployment_id | string | (wire: microfrontendsDefaultAppDeploymentId) |
microfrontends_default_app_project_id | string | (wire: microfrontendsDefaultAppProjectId) |
network_id | string | (wire: networkId) |
privatelink_endpoint_id | string | (wire: privatelinkEndpointId) |
project_id | string | (wire: projectId) |
quota_entity_id | string | (wire: quotaEntityId) |
reporting_project_id | string | (wire: reportingProjectId) |
request_id | string | (wire: requestId) |
sandbox_session_id | string | (wire: sandboxSessionId) |
sdk_key_id | string | (wire: sdkKeyId) |
session_id | string | (wire: sessionId) |
step_run_id | string | (wire: stepRunId) |
store_id | string | (wire: storeId) |
visitor_id | string | (wire: visitorId) |
waf_rule_id | string | (wire: wafRuleId) |
workflow_run_id | string | (wire: workflowRunId) |
app_name | string | (wire: appName) |
asn_name | string | (wire: asnName) |
attribution_event_name | string | (wire: attributionEventName) |
bot_name | string | (wire: botName) |
browser_name | string | (wire: browserName) |
entry_name | string | (wire: entryName) |
event_name | string | (wire: eventName) |
flag_client_name | string | (wire: flagClientName) |
key_name | string | (wire: keyName) |
metric_name | string | (wire: metricName) |
os_name | string | (wire: osName) |
privatelink_dns_name | string | (wire: privatelinkDnsName) |
project_name | string | (wire: projectName) |
queue_name | string | (wire: queueName) |
reporting_project_name | string | (wire: reportingProjectName) |
repository_name | string | (wire: repositoryName) |
sandbox_name | string | (wire: sandboxName) |
server_action_name | string | (wire: serverActionName) |
store_name | string | (wire: storeName) |
tag_name | string | (wire: tagName) |
workflow_name | string | (wire: workflowName) |
workflow_step_name | string | (wire: workflowStepName) |
ai_model | string | (wire: aiModel) |
ai_model_type | string | (wire: aiModelType) |
ai_provider | string | (wire: aiProvider) |
attributes | string | |
attribution_target | string | (wire: attributionTarget) |
auth_method | string | (wire: authMethod) |
billable_region | string | (wire: billableRegion) |
blob_operation_level | string | (wire: blobOperationLevel) |
blob_operation_type | string | (wire: blobOperationType) |
bot_category | string | (wire: botCategory) |
bot_category_legacy | string | (wire: botCategoryLegacy) |
bot_check_result | string | (wire: botCheckResult) |
bot_verified | string | (wire: botVerified) |
cache_api | string | (wire: cacheApi) |
cache_creation_1h_input_tokens_currency | string | (wire: cacheCreation1hInputTokensCurrency) |
cache_creation_input_tokens_currency | string | (wire: cacheCreationInputTokensCurrency) |
cache_hit_level | string | (wire: cacheHitLevel) |
cache_hit_state | string | (wire: cacheHitState) |
cache_hostname | string | (wire: cacheHostname) |
cache_operation | string | (wire: cacheOperation) |
cache_path | string | (wire: cachePath) |
cache_reason | string | (wire: cacheReason) |
cache_result | string | (wire: cacheResult) |
cache_tags | string | (wire: cacheTags) |
cached_input_tokens_currency | string | (wire: cachedInputTokensCurrency) |
cause | string | |
client_ip | string | (wire: clientIp) |
client_ip_country | string | (wire: clientIpCountry) |
client_ja_4_digest | string | (wire: clientJa4Digest) |
client_user_agent | string | (wire: clientUserAgent) |
coding_agent | string | (wire: codingAgent) |
commit_sha | string | (wire: commitSha) |
consumer_group | string | (wire: consumerGroup) |
content_capture_inputs | string | (wire: contentCaptureInputs) |
content_capture_outputs | string | (wire: contentCaptureOutputs) |
content_capture_status | string | (wire: contentCaptureStatus) |
content_type | string | (wire: contentType) |
cost_currency | string | (wire: costCurrency) |
country | string | |
data_cache_region | string | (wire: dataCacheRegion) |
deep_analysis_check | string | (wire: deepAnalysisCheck) |
device_type | string | (wire: deviceType) |
direction | string | |
edge_network_region | string | (wire: edgeNetworkRegion) |
edge_type | string | (wire: edgeType) |
entry_revalidate_seconds | string | (wire: entryRevalidateSeconds) |
environment | string | |
error_code | string | (wire: errorCode) |
error_message | string | (wire: errorMessage) |
event_data | string | (wire: eventData) |
event_type | string | (wire: eventType) |
external_rewrite_target_host | string | (wire: externalRewriteTargetHost) |
external_rewrite_target_path | string | (wire: externalRewriteTargetPath) |
fetch_index | string | (wire: fetchIndex) |
fetch_type | string | (wire: fetchType) |
flag_evaluation_reason | string | (wire: flagEvaluationReason) |
flag_key | string | (wire: flagKey) |
flag_variant | string | (wire: flagVariant) |
flags | string | |
function_dispatcher | string | (wire: functionDispatcher) |
function_region | string | (wire: functionRegion) |
function_start_type | string | (wire: functionStartType) |
gateway_cost_currency | string | (wire: gatewayCostCurrency) |
hipaa_requested | string | (wire: hipaaRequested) |
http_accept | string | (wire: httpAccept) |
http_status | string | (wire: httpStatus) |
image_source | string | (wire: imageSource) |
image_transformation_region | string | (wire: imageTransformationRegion) |
inference_endpoint_slug | string | (wire: inferenceEndpointSlug) |
inference_geo_region | string | (wire: inferenceGeoRegion) |
inference_provider_region | string | (wire: inferenceProviderRegion) |
inference_scope | string | (wire: inferenceScope) |
is_additional_request | string | (wire: isAdditionalRequest) |
is_byok | string | (wire: isByok) |
is_prefetch_request | string | (wire: isPrefetchRequest) |
is_private_model | string | (wire: isPrivateModel) |
is_request_zdr | string | (wire: isRequestZdr) |
is_streaming | string | (wire: isStreaming) |
isr_action | string | (wire: isrAction) |
isr_cache_region | string | (wire: isrCacheRegion) |
market_cost_currency | string | (wire: marketCostCurrency) |
microfrontends_matched_path | string | (wire: microfrontendsMatchedPath) |
microfrontends_response_reason | string | (wire: microfrontendsResponseReason) |
middleware_action | string | (wire: middlewareAction) |
middleware_action_target | string | (wire: middlewareActionTarget) |
moderation_applied | string | (wire: moderationApplied) |
network_tenancy | string | (wire: networkTenancy) |
notification_url | string | (wire: notificationUrl) |
optimized_format_mime_type | string | (wire: optimizedFormatMimeType) |
optimized_quality | string | (wire: optimizedQuality) |
optimized_width_pixels | string | (wire: optimizedWidthPixels) |
origin_hostname | string | (wire: originHostname) |
origin_path | string | (wire: originPath) |
origin_route | string | (wire: originRoute) |
path_type | string | (wire: pathType) |
path_type_variant | string | (wire: pathTypeVariant) |
pii_redaction_applied | string | (wire: piiRedactionApplied) |
ppr_state | string | (wire: pprState) |
privatelink_ip_address | string | (wire: privatelinkIpAddress) |
provider | string | |
provider_attempt_canonical_slug | string | (wire: providerAttemptCanonicalSlug) |
provider_attempt_credential_type | string | (wire: providerAttemptCredentialType) |
provider_attempt_dev_safety_identifier | string | (wire: providerAttemptDevSafetyIdentifier) |
provider_attempt_error | string | (wire: providerAttemptError) |
provider_attempt_is_final | string | (wire: providerAttemptIsFinal) |
provider_attempt_model_index | string | (wire: providerAttemptModelIndex) |
provider_attempt_number | string | (wire: providerAttemptNumber) |
provider_attempt_region | string | (wire: providerAttemptRegion) |
provider_attempt_safety_identifier | string | (wire: providerAttemptSafetyIdentifier) |
provider_attempt_status_code | string | (wire: providerAttemptStatusCode) |
provider_attempt_success | string | (wire: providerAttemptSuccess) |
provider_attempt_timeout | string | (wire: providerAttemptTimeout) |
provider_attempt_total_in_request | string | (wire: providerAttemptTotalInRequest) |
pull_request_number | string | (wire: pullRequestNumber) |
pull_request_state | string | (wire: pullRequestState) |
queue_region | string | (wire: queueRegion) |
quota_entity_type | string | (wire: quotaEntityType) |
quota_requested | string | (wire: quotaRequested) |
reason | string | |
redirect_location | string | (wire: redirectLocation) |
referrer_hostname | string | (wire: referrerHostname) |
referrer_url | string | (wire: referrerUrl) |
region | string | |
repository_owner | string | (wire: repositoryOwner) |
request_api | string | (wire: requestApi) |
request_extension | string | (wire: requestExtension) |
request_hostname | string | (wire: requestHostname) |
request_method | string | (wire: requestMethod) |
request_path | string | (wire: requestPath) |
request_resolved_ip | string | (wire: requestResolvedIp) |
requested_inference_region | string | (wire: requestedInferenceRegion) |
review_conclusion | string | (wire: reviewConclusion) |
review_status | string | (wire: reviewStatus) |
rewrite_destination_hostname | string | (wire: rewriteDestinationHostname) |
route | string | |
rule_category | string | (wire: ruleCategory) |
runtime | string | |
sdk_key_environment | string | (wire: sdkKeyEnvironment) |
served_speed | string | (wire: servedSpeed) |
service | string | |
skew_protection | string | (wire: skewProtection) |
source | string | |
source_image | string | (wire: sourceImage) |
source_image_hash | string | (wire: sourceImageHash) |
source_image_hostname | string | (wire: sourceImageHostname) |
source_image_pathname | string | (wire: sourceImagePathname) |
spec_version | string | (wire: specVersion) |
spend_attribution | string | (wire: spendAttribution) |
spend_report_date_part | string | (wire: spendReportDatePart) |
spend_report_group_by | string | (wire: spendReportGroupBy) |
surcharge_cost_currency | string | (wire: surchargeCostCurrency) |
timestamp | string (date-time) | |
tool_call_error_type | string | (wire: toolCallErrorType) |
tool_call_provider | string | (wire: toolCallProvider) |
tool_call_status_code | string | (wire: toolCallStatusCode) |
tool_call_success | string | (wire: toolCallSuccess) |
tool_call_type | string | (wire: toolCallType) |
traffic_source | string | (wire: trafficSource) |
transcript_inputs | string | (wire: transcriptInputs) |
transcript_outputs | string | (wire: transcriptOutputs) |
transcript_status | string | (wire: transcriptStatus) |
triggering_tag | string | (wire: triggeringTag) |
utm_campaign | string | (wire: utmCampaign) |
utm_content | string | (wire: utmContent) |
utm_medium | string | (wire: utmMedium) |
utm_source | string | (wire: utmSource) |
utm_term | string | (wire: utmTerm) |
vdc_operation_origin | string | (wire: vdcOperationOrigin) |
video_aspect_ratio | string | (wire: videoAspectRatio) |
video_resolution | string | (wire: videoResolution) |
virtual_model_kind | string | (wire: virtualModelKind) |
virtual_model_slug | string | (wire: virtualModelSlug) |
waf_action | string | (wire: wafAction) |
workflow_event_type | string | (wire: workflowEventType) |
workflow_status | string | (wire: workflowStatus) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | project_id, by, since, until | limit, filter, team_id, slug | 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
by | array | Up to two dimensions used to break down results. At most one time granularity is allowed: hour, day, week, month, year. Other dimensions: country, deviceType, environment, requestPath, referrerHostname, osName, browserName, route, utmSource, utmMedium, utmCampaign, utmContent, utmTerm. 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'. |
project_id | string | The project identifier or the project name (wire: projectId) |
since | | 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. |
until | | Timestamp in milliseconds, or a valid Date string. Selects data until (including) this date. Will be adjusted according to the desired time granularity. |
filter | string | OData-compliant filter. Encode the value when sending it in a URL. Allows filtering on one or multiple dimensions. By default, filters for production environment only. 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. |
limit | integer | Number of distinct results, default to 10. Other results are grouped into "Others" group. |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- list
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.
SELECT
ai_gateway_model_id,
asn_id,
deployment_id,
entry_id,
entry_item_id,
environment_id,
generation_id,
key_id,
message_id,
microfrontends_default_app_deployment_id,
microfrontends_default_app_project_id,
network_id,
privatelink_endpoint_id,
project_id,
quota_entity_id,
reporting_project_id,
request_id,
sandbox_session_id,
sdk_key_id,
session_id,
step_run_id,
store_id,
visitor_id,
waf_rule_id,
workflow_run_id,
app_name,
asn_name,
attribution_event_name,
bot_name,
browser_name,
entry_name,
event_name,
flag_client_name,
key_name,
metric_name,
os_name,
privatelink_dns_name,
project_name,
queue_name,
reporting_project_name,
repository_name,
sandbox_name,
server_action_name,
store_name,
tag_name,
workflow_name,
workflow_step_name,
ai_model,
ai_model_type,
ai_provider,
attributes,
attribution_target,
auth_method,
billable_region,
blob_operation_level,
blob_operation_type,
bot_category,
bot_category_legacy,
bot_check_result,
bot_verified,
cache_api,
cache_creation_1h_input_tokens_currency,
cache_creation_input_tokens_currency,
cache_hit_level,
cache_hit_state,
cache_hostname,
cache_operation,
cache_path,
cache_reason,
cache_result,
cache_tags,
cached_input_tokens_currency,
cause,
client_ip,
client_ip_country,
client_ja_4_digest,
client_user_agent,
coding_agent,
commit_sha,
consumer_group,
content_capture_inputs,
content_capture_outputs,
content_capture_status,
content_type,
cost_currency,
country,
data_cache_region,
deep_analysis_check,
device_type,
direction,
edge_network_region,
edge_type,
entry_revalidate_seconds,
environment,
error_code,
error_message,
event_data,
event_type,
external_rewrite_target_host,
external_rewrite_target_path,
fetch_index,
fetch_type,
flag_evaluation_reason,
flag_key,
flag_variant,
flags,
function_dispatcher,
function_region,
function_start_type,
gateway_cost_currency,
hipaa_requested,
http_accept,
http_status,
image_source,
image_transformation_region,
inference_endpoint_slug,
inference_geo_region,
inference_provider_region,
inference_scope,
is_additional_request,
is_byok,
is_prefetch_request,
is_private_model,
is_request_zdr,
is_streaming,
isr_action,
isr_cache_region,
market_cost_currency,
microfrontends_matched_path,
microfrontends_response_reason,
middleware_action,
middleware_action_target,
moderation_applied,
network_tenancy,
notification_url,
optimized_format_mime_type,
optimized_quality,
optimized_width_pixels,
origin_hostname,
origin_path,
origin_route,
path_type,
path_type_variant,
pii_redaction_applied,
ppr_state,
privatelink_ip_address,
provider,
provider_attempt_canonical_slug,
provider_attempt_credential_type,
provider_attempt_dev_safety_identifier,
provider_attempt_error,
provider_attempt_is_final,
provider_attempt_model_index,
provider_attempt_number,
provider_attempt_region,
provider_attempt_safety_identifier,
provider_attempt_status_code,
provider_attempt_success,
provider_attempt_timeout,
provider_attempt_total_in_request,
pull_request_number,
pull_request_state,
queue_region,
quota_entity_type,
quota_requested,
reason,
redirect_location,
referrer_hostname,
referrer_url,
region,
repository_owner,
request_api,
request_extension,
request_hostname,
request_method,
request_path,
request_resolved_ip,
requested_inference_region,
review_conclusion,
review_status,
rewrite_destination_hostname,
route,
rule_category,
runtime,
sdk_key_environment,
served_speed,
service,
skew_protection,
source,
source_image,
source_image_hash,
source_image_hostname,
source_image_pathname,
spec_version,
spend_attribution,
spend_report_date_part,
spend_report_group_by,
surcharge_cost_currency,
timestamp,
tool_call_error_type,
tool_call_provider,
tool_call_status_code,
tool_call_success,
tool_call_type,
traffic_source,
transcript_inputs,
transcript_outputs,
transcript_status,
triggering_tag,
utm_campaign,
utm_content,
utm_medium,
utm_source,
utm_term,
vdc_operation_origin,
video_aspect_ratio,
video_resolution,
virtual_model_kind,
virtual_model_slug,
waf_action,
workflow_event_type,
workflow_status
FROM vercel.web_analytics.pageview_aggregates
WHERE project_id = '{{ project_id }}' -- required
AND by = '{{ by }}' -- required
AND since = '{{ since }}' -- required
AND until = '{{ until }}' -- required
AND limit = '{{ limit }}'
AND filter = '{{ filter }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;