Skip to main content

Pages Endpoint

The Pages endpoint provides detailed analytics about page views and traffic to your website pages. This endpoint allows you to retrieve metrics such as views, entry pages, and other page-related statistics.

Endpoint Details

  • URL: https://app.sealmetrics.com/api/report/pages
  • Method: GET
  • Authentication: Bearer Token required

Request Parameters

Headers

HeaderValueRequired
AuthorizationBearer your_access_tokenYes
Acceptapplication/jsonYes
Connectionkeep-aliveRecommended
Accept-Encodinggzip, deflate, brRecommended

Query Parameters

ParameterTypeRequiredDescription
account_idstringYesYour account identifier
date_rangestringYesDate range (YYYYMMDD,YYYYMMDD or predefined values like this_month, yesterday, last_7_days, last_14_days, last_30_days, last_60_days, last_90_days, last_month, this_week_monday_sunday, this_week_sunday_saturday, this_year, last_year)
skipintegerNoRecords to skip for pagination (default: 0)
limitintegerNoMax number of records to return (default: 1,000, max: 10,000)
countrystringNoFilter by country using ISO 3166-1 alpha-2 code (e.g., "es", "us")
utm_mediumstringNoFilter by medium (e.g., "cpc", "email", "banner")
utm_sourcestringNoFilter by traffic source (e.g., "google", "newsletter")
show_utmsbooleanNoDisplay UTM parameters and content grouping in results (default: false)
content_groupingstringNoFilter results by content group name (e.g., "Blog Content", "Product Catalog", "Support Pages", "Purchase Flow")
exclude_countriesstringNoExclude countries using comma-separated ISO 3166-1 alpha-2 codes (e.g., "pt,es")

Example Request

cURL

curl --location 'https://app.sealmetrics.com/api/report/pages?account_id=000000000000000000001234&date_range=this_month&skip=0&limit=100' --header 'Authorization: Bearer YOUR_TOKEN' --header 'Accept: application/json' --header 'Connection: keep-alive' --header 'Accept-Encoding: gzip, deflate, br'

Python

import requests

url = "https://app.sealmetrics.com/api/report/pages"

querystring = {
"account_id": "000000000000000000001234",
"date_range": "this_month",
"skip": "0",
"limit": "100"
}

headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Accept": "application/json",
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br"
}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

JavaScript

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_TOKEN");
myHeaders.append("Accept", "application/json");
myHeaders.append("Connection", "keep-alive");
myHeaders.append("Accept-Encoding", "gzip, deflate, br");

var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};

fetch("https://app.sealmetrics.com/api/report/pages?account_id=000000000000000000001234&date_range=this_month&skip=0&limit=100", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Success Response (200 OK)

{
"status": "ok",
"data": [
{ "url": "/", "views": 21955, "entry_page": 7221 },
{ "url": "/agencia-seo", "views": 8765, "entry_page": 3421 },
{ "url": "/blog/marketing-digital", "views": 5432, "entry_page": 2198 }
]
}

Response Parameters

FieldTypeDescription
urlstringThe page URL path
viewsnumberTotal page views
entry_pagenumberHow many times this page was the first visited

Error Responses

401 Unauthorized

{
"status": "error",
"message": "Unauthenticated"
}

400 Bad Request

{
"status": "error",
"message": "Missing required parameter: account_id"
}

Filtering by Content Grouping

The content_grouping parameter allows you to filter page analytics by content categories. This is useful when you want to analyze specific sections of your website that have been grouped together.

How Content Grouping Works

When implementing the SealMetrics tracking pixel, you can assign pages to content groups using the content_grouping parameter:

var options = {
account: '68a4a04603963e02af56487f',
event: 'pageview',
content_grouping: 'Blog Content', // Group name
use_session: 1,
};

Once pages are tagged with content groups, you can filter API results to show only pages from specific groups.

Example: Filter by Content Group

curl --location 'https://app.sealmetrics.com/api/report/pages?account_id=000000000000000000001234&date_range=this_month&content_grouping=Blog%20Content&limit=100' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Accept: application/json'

Common Content Group Examples

  • "Blog Content" - All blog posts and articles
  • "Product Catalog" - Product listing and detail pages
  • "Support Pages" - Help documentation and FAQs
  • "Purchase Flow" - Checkout and cart pages
  • "Landing Pages" - Marketing campaign landing pages

Using with show_utms Parameter

Set show_utms=true to include UTM parameters and content grouping information in the response data, which provides additional context about traffic sources for each page.

Notes

  • Results are usually sorted by views (descending)
  • Use UTM filters for campaign-specific page insights
  • show_utms=true returns detailed UTM breakdown including content grouping data
  • Pagination (skip, limit) is recommended for large sites
  • Content grouping must be configured in your tracking pixel before it can be used as a filter
  • See the Content Grouping Implementation Guide for setup instructions