Pages
The Pages API lets you read your store's landing pages and their traffic analytics.
Overview
The Pages API provides endpoints to:
A page is a landing page you have built in your store. The API is read-only - pages are authored in your store's admin interface, not through the API. Each page in the list includes its custom domains, so you can match a domain to a page from the response itself, then ask for that page's analytics.
Page identifiers
Each page has two identifiers, and they are not interchangeable:
idis the page's stable identifier - a short, URL-safe string (for exampleDeIS7b). It is not a UUID like other resources' ids.idnever changes, and it is the key you pass to Get Page Analytics.slugis the page's URL slug (for examplemy-landing-page). It is mutable - editing the slug changes it - so use it for display only, never as a stable reference.
Page status
A page is either draft or published. Filter the list by either value, or
omit the filter to return pages in any state.
Analytics breakdowns
Get Page Analytics returns one breakdown per call,
selected with the type parameter:
| Type | Returns |
|---|---|
summary | Period totals - visitors, pageviews, bounce rate, and revenue. |
daily | Per-day visitor and revenue trend. |
sources | Traffic sources (Google, Direct, ...) with a referrer-URL drill-down. |
countries | Visitors and revenue by country. |
devices | Device-type split, keyed by pageviews and their share. |
paths | Paths/sections within the page (/, /pricing). |
partners | Affiliate (?ref=) partner performance. |
realtime | Visitors on the page in the last 5 minutes (live snapshot). |
Revenue is reported per currency, with amounts in major currency units
(for example 450.0, not minor units). Rate fields whose name ends in
_percent are already expressed as a percentage - 0.13 means 0.13%, not a
0-1 ratio. See Get Page Analytics for the full shape of
each breakdown.