Query Recipes
How to read key metrics: see the Metrics Glossary for Sessions (Visits), Pageviews, Events, Revenue, Conversions, CR, AOV, Revenue per Session, and Traffic Source.
Request Template
{
"query": "query Example($input: AnalyticsQueryInput!) { analytics(input: $input) { summary { total } rows { dimension value } } }",
"variables": {
"input": {
"siteId": "123",
"metric": "SESSIONS",
"range": { "start": "2026-01-01", "end": "2026-01-31" }
}
}
}
viewerAccess
query ViewerAccess {
viewerAccess {
accountId
allowedSites
allowedEndpoints
siteScope
}
}
sites
query Sites {
sites {
id
name
domain
timezone
status
}
}
analytics
query AnalyticsDaily($input: AnalyticsQueryInput!) {
analytics(input: $input) {
summary { total }
rows { dimension value }
}
}
{
"input": {
"siteId": "123",
"metric": "SESSIONS",
"range": { "start": "2026-01-01", "end": "2026-01-31" },
"breakdown": "DATE"
}
}
sessionAnalytics
Common outputs include Sessions (Visits), Revenue, Conversions, and Conversion Rate (CR). See the Metrics Glossary for formulas.
query SessionTrend($input: SessionAnalyticsQueryInput!) {
sessionAnalytics(input: $input) {
summary { total }
seriesRows
totals
}
}
pageviewAnalytics
This query is often used with REVENUE, REVENUE_PER_SESSION, AVERAGE_ORDER_VALUE (AOV), and CONVERSION_RATE (CR) metrics.
query PageTable($input: PageviewAnalyticsQueryInput!) {
pageviewAnalytics(input: $input) {
summary { total }
tableRows
}
}
journeyContinuationAnalytics
query JourneyContinuation($input: JourneyContinuationAnalyticsQueryInput!) {
journeyContinuationAnalytics(input: $input) {
summary { total }
rows {
matchedStepPageIds
nextPageId
nextPageName
nextPageScreenshotUrl
}
}
}
rawPageviewAnalytics
This output includes Sessions (Visits), Pageviews, Revenue, Revenue per Session, AOV, and CR in one table-friendly response.
query RawPageviews($input: RawPageviewAnalyticsQueryInput!) {
rawPageviewAnalytics(input: $input) {
summary { total }
rows {
page
serverDate
sessions
pageviews
revenue
revenuePerSession
averageOrderValue
conversionRate
purchases
scrollDepth
timeOnPage
}
}
}
rawEventAnalytics
Use this for selector-level event and value analysis; revenue and AOV fields represent conversion-linked value metrics.
query RawEvents($input: RawEventAnalyticsQueryInput!) {
rawEventAnalytics(input: $input) {
summary { total }
rows {
page
selector
offsetX
offsetY
value
orders
revenue
aov
}
}
}
{
"input": {
"siteId": "2821",
"range": { "start": "2026-04-02", "end": "2026-04-06" },
"selector": ".product-card .cta",
"pageUrl": "https://example.com/products",
"includePage": true,
"orderBy": "REVENUE",
"sortDirection": "DESC",
"limit": 100
}
}
includePagecontrols page grouping/projection in rows.- Default ordering is
REVENUE DESCwhenorderBy/sortDirectionare omitted. revenueandaovare conversion-linked value metrics.
funnels
query Funnel($input: FunnelQueryInput!) {
funnels(input: $input) {
summary { total }
rows {
stepOrder
step
sessions
completedUsers
completedRate
abandonedUsers
abandonedRate
revenue
revenuePerCompletedUser
}
}
}
summary.total is Step 1 (All Sessions) completed users. The API always includes an implicit first step of All Sessions; provided steps become Step 2 and beyond.
steps must be sent in variables as an array of FunnelStepInput objects.
Postman tip: send nested step objects in the JSON variables body (raw request) instead of form/query params.
{
"query": "query Funnel($input: FunnelQueryInput!) { funnels(input: $input) { summary { total } rows { stepOrder step sessions completedUsers completedRate abandonedUsers abandonedRate revenue revenuePerCompletedUser } } }",
"variables": {
"input": {
"siteId": "123",
"range": { "start": "2026-01-01", "end": "2026-01-31" },
"steps": [
{ "type": "EVENT", "event": "PRODUCT_VIEWED" },
{ "type": "PAGE_VIEW", "page": { "operator": "BEGINS", "value": "https://example.com/products" } },
{ "type": "EVENT", "event": "CHECKOUT_STARTED" },
{ "type": "EVENT", "event": "CHECKOUT_COMPLETED" }
]
}
}
}
query {
funnels(
input: {
siteId: "123"
range: { start: "2026-01-01", end: "2026-01-31" }
steps: [
{ type: EVENT, event: PRODUCT_VIEWED }
{ type: PAGE_VIEW, page: { operator: BEGINS, value: "https://example.com/products" } }
{ type: EVENT, event: CHECKOUT_STARTED }
]
}
) {
summary { total }
rows {
stepOrder
step
completedUsers
abandonedRate
}
}
}
heatmap
events here means total matched interaction events for each grouped row.
query Heatmap($input: HeatmapQueryInput!) {
heatmap(input: $input) {
summary { total }
rows {
url
selector
eventType
events
}
}
}
conversions
Use this query when you want conversion volume and revenue quality metrics broken down by date, conversion name, page, country, or device.
Row fields:
dimension— the breakdown value (null when no breakdown is selected)conversions— total conversion records matchedorders— same asconversions(one record = one order)revenue— summed revenue across matched conversions (nullable; null means no revenue data)aov— average order value (revenue / orders); null when no orders
query Conversions($input: ConversionQueryInput!) {
conversions(input: $input) {
summary { total }
rows {
dimension
conversions
orders
revenue
aov
}
}
}
customEvents
Row fields:
dimension— the breakdown value (null when no breakdown is selected)events— total event count across matched rows
query CustomEvents($input: CustomEventQueryInput!) {
customEvents(input: $input) {
summary { total }
rows {
dimension
events
}
}
}