Analytics session schema
See Management API schema for every domain, the endpoint and authentication.
Types
AnalyticsSession
"""
A visit: the analytics events one visitor produced on a site, from their first event until 30
minutes passed without another.
"""
type AnalyticsSession {
"""The ID of the session."""
id: ID!
"""
What the visit adds up to: when it started and ended, how the visitor arrived, and their device
and location.
Scope: `ORGANIZATION_SESSIONS_READ`.
"""
summary: AnalyticsSessionSummary! @auth
"""
The visit's timeline, oldest first. Without a cursor, the page is anchored on the visit's capture
event, or on its latest event when it captured no lead: `last` ends the page there, `first`
starts it there, and with neither the page is the 20 events ending there. A page holds at most
100 events. The newest events can take a few minutes to arrive.
Scope: `ORGANIZATION_SESSIONS_READ`.
"""
events(first: Int, after: String, last: Int, before: String): AnalyticsEventConnection! @auth
"""
The lead captured during the visit. Null when the visit captured none. Reached through
`Lead.session`, it is that lead; otherwise it is the latest lead the visit captured.
Scope: `ORGANIZATION_LEADS_READ`.
"""
lead: Lead @auth
"""
The Session reports on the visit: the overview, the journey and the event log, in that order.
Scope: `ORGANIZATION_SESSIONS_READ`.
"""
reports: [AnalyticsSessionReport!]! @auth
}AnalyticsSessionReport
"""
A report on one analytics session, embedded so that it shows that visit and no other.
"""
type AnalyticsSessionReport {
"""Which of the Session reports this is."""
kind: AnalyticsSessionReportKind!
"""
The URL of a signed embed of the report, for an iframe. It expires 3 hours after it is read.
"""
embedUrl: String!
"""
The id of the analytics dashboard of this kind that the Embedded Analytics SDK renders, in the
project's data residency.
"""
analyticsDashboardId: Int!
}AnalyticsSessionReportKind
"""The reports on one analytics session."""
enum AnalyticsSessionReportKind {
"""
How the visit ended, who the visitor was, when they were active and their other visits.
"""
OVERVIEW
"""
Every step entry in order, with time on step, submit outcomes, errors and clicks.
"""
JOURNEY
"""Every event the visit recorded, in order, by the visitor's clock."""
EVENT_LOG
}AnalyticsSessionsReport
"""
A report on all of a project's analytics sessions, embedded so that it shows that project's
sessions and no other. Its date range is a filter inside the embed.
"""
type AnalyticsSessionsReport {
"""Which of the Sessions reports this is."""
kind: AnalyticsSessionsReportKind!
"""
The URL of a signed embed of the report, for an iframe. It expires 3 hours after it is read.
"""
embedUrl: String!
"""
The id of the analytics dashboard of this kind that the Embedded Analytics SDK renders, in the
project's data residency.
"""
analyticsDashboardId: Int!
}AnalyticsSessionsReportKind
"""The reports on all of a project's analytics sessions."""
enum AnalyticsSessionsReportKind {
"""
How sessions arrive: volume, channel, referrer, campaign, landing page, device, place and time of arrival.
"""
ACQUISITION
"""
The journeys sessions take: length, pages, returning visits, experiences, step paths and where they leave.
"""
JOURNEYS
"""
Which sessions convert: the funnel, and the conversion rate by week and by segment.
"""
CONVERSION
}AnalyticsSessionSearchSuggestion
"""
A session search suggested for what was typed into a sessions search box.
"""
type AnalyticsSessionSearchSuggestion {
"""The session search query."""
query: String!
"""What the query finds, in plain English."""
description: String!
"""How many sessions the query keeps within the window."""
count: Int!
}AnalyticsSessionConnection
"""A page of analytics sessions."""
type AnalyticsSessionConnection {
"""The edges in this page."""
edges: [AnalyticsSessionEdge!]!
"""The items in this page."""
nodes: [AnalyticsSession!]!
"""Where this page sits in the list."""
pageInfo: PageInfo!
"""
Metrics over every session in the connection's `window`, across all pages. Pass `first: 0` on
`Project.analyticsSessions` to read the metrics without a page.
"""
metrics: AnalyticsSessionMetrics!
}AnalyticsSessionMetrics
"""
Metrics over the sessions an `AnalyticsSessionConnection` holds, across all pages.
"""
type AnalyticsSessionMetrics {
"""
The number of sessions, by when each started. A session counts from its first event inside the
window, so a visit that began before the window counts. `groupBy: CONVERTED` splits the count
into `converted` and `not_converted`.
"""
count(groupBy: AnalyticsSessionCountGroupBy): CountMetric!
}AnalyticsSessionCountGroupBy
"""What a session count can be split by."""
enum AnalyticsSessionCountGroupBy {
"""Whether one of the session's events inside the window captured a lead."""
CONVERTED
}AnalyticsSessionEdge
"""An analytics session in a page of results."""
type AnalyticsSessionEdge {
"""The cursor of this edge."""
cursor: String!
"""The item."""
node: AnalyticsSession!
}AnalyticsSessionSummary
"""What an analytics session adds up to."""
type AnalyticsSessionSummary {
"""
When the session's first event happened, by the visitor's device clock.
"""
startedAt: DateTime!
"""When the session's last event happened, by the visitor's device clock."""
endedAt: DateTime!
"""The number of events the session's `events` timeline lists."""
eventCount: Int!
"""The number of pages the visitor viewed."""
pageViewCount: Int!
"""
The full URL of the session's first page. Null when no event recorded one.
"""
landingPageUrl: String
"""
Where the visitor came from. Null when the landing page had no referrer.
"""
referrer: AnalyticsReferrer
"""
The UTM campaign of the landing page's URL. Null when none of its fields has a value.
"""
campaign: AnalyticsCampaign
"""The visitor's device. Null when it is unknown."""
device: AnalyticsDevice
"""Where the visitor was. Null when it is unknown."""
location: AnalyticsLocation
"""
The visitor's Google Analytics client ID, from the first event to carry one. Null when none did.
"""
gaid: String
"""
The Google Ads click ID, the `gclid` of the landing page's URL. Null when it carried none.
"""
gclid: String
"""
The visitor's canonical ID, which joins their browsers into one visitor, from the first event to carry one. Null when none did.
"""
visitorId: String
}AnalyticsReferrer
"""The site that referred a visitor. A field is null when it is unknown."""
type AnalyticsReferrer {
"""The referrer's name, in lowercase, such as `google` or `facebook`."""
source: String
"""
The kind of referrer, such as `search`, `social`, `email` or `internal`.
"""
medium: String
}AnalyticsCampaign
"""
A visit's UTM campaign parameters. A field is null when the URL did not carry it.
"""
type AnalyticsCampaign {
"""`utm_source`."""
source: String
"""`utm_medium`."""
medium: String
"""`utm_campaign`."""
name: String
"""
`utm_term`. Null as well when the URL carried neither `utm_source` nor `utm_medium`.
"""
term: String
"""
`utm_content`. Null as well when the URL carried neither `utm_source` nor `utm_medium`.
"""
content: String
}AnalyticsDevice
"""
A visitor's device, as read from their user agent. A field is null when it is unknown.
"""
type AnalyticsDevice {
"""The class of device, such as `Desktop`, `Phone` or `Tablet`."""
category: String
"""The browser's name, such as `Chrome`."""
browser: String
"""The browser's major version."""
browserVersion: String
"""The operating system's name, such as `Mac OS` or `Android`."""
operatingSystem: String
"""The operating system's version."""
operatingSystemVersion: String
}AnalyticsLocation
"""
Where a visitor was, as looked up from their IP address. A field is null when it is unknown.
"""
type AnalyticsLocation {
"""The city's English name."""
city: String
"""The ISO 3166-2 code of the region within the country, such as `NSW`."""
region: String
"""The country's English name."""
country: String
"""The country's ISO 3166-1 alpha-2 code."""
countryCode: String
}AnalyticsEvent
"""
One analytics event in a visit: a page viewed, a step entered or submitted, a product added to the
cart, a lead captured. A text field is null when the event did not record it.
"""
type AnalyticsEvent {
"""The ID of the event."""
id: ID!
"""
The event type, such as `page_view`, `step_enter`, `cart_add` or `lead_created`.
"""
type: String!
"""When the event happened, by the visitor's device clock."""
occurredAt: DateTime!
"""The full URL of the page the event happened on."""
pageUrl: String
"""The path of the page the event happened on."""
pagePath: String
"""The title of the experience the event happened in."""
experienceTitle: String
"""The title of the step the event concerns."""
stepTitle: String
"""The title of the form the event concerns."""
formTitle: String
"""The title of the modal the event concerns."""
modalTitle: String
"""
The name of a product the event concerns: one of them, when it concerns several.
"""
productTitle: String
}AnalyticsEventConnection
"""A page of analytics events."""
type AnalyticsEventConnection {
"""The edges in this page."""
edges: [AnalyticsEventEdge!]!
"""The items in this page."""
nodes: [AnalyticsEvent!]!
"""Where this page sits in the list."""
pageInfo: PageInfo!
}AnalyticsEventEdge
"""An analytics event in a page of results."""
type AnalyticsEventEdge {
"""The cursor of this edge."""
cursor: String!
"""The item."""
node: AnalyticsEvent!
}