Pull analytics from your site
Query site event data to identify your most-visited pages.
Before you begin
Request page metrics
curl --request POST \
--url "https://api.gitbook.com/v1/orgs/$ORGANIZATION_ID/sites/$SITE_ID/insights/events/aggregate" \
--header "Authorization: Bearer $GITBOOK_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"select": [
{ "column": "url" },
{ "column": "eventsCount" },
{ "column": "visitorsCount" }
],
"groupBy": [
{ "column": "url" }
],
"order": {
"by": { "column": "eventsCount" },
"direction": "desc"
},
"range": "last30Days",
"limit": 20
}'Read the results
Refine the report
Last updated
Was this helpful?