Skip to main content
GET
Get GA chart data
Get your website analytics from Google Analytics 4. These endpoints power the Traffic dashboard’s Analytics tab when GA4 is your connected provider - users, pageviews, sessions, traffic sources, top pages, and device breakdowns.
You need a Google Analytics 4 integration connected to your team. Connect it from Settings → Integrations → Analytics & Performance. Using PostHog instead? See Analytics (PostHog). Using Plausible? See Analytics (Plausible).
These routes require an active plan; without one they return 403. Pass startDate and endDate or days; see Date Windows.

Filters Parameter

The filters query parameter accepts URL-encoded JSON: an object keyed by dimension, each with a list of selected values. Dimensions: page, referrer, channel, campaign, deviceCategory, browser, os. Invalid JSON, an unknown dimension, or a value that is not a list returns 400 with code INVALID_FILTERS naming the supported dimensions.
Available dimensions: channel, referrer, campaign, deviceCategory, browser, os, page. Call GET /v3/integrations/ga/filter-values for the available dimension values.

Traffic Chart

GET /v3/integrations/ga/chart/overview Get daily users, pageviews, and sessions for the selected date range - used to power the main trend chart. Pass includePrevious=true for previous-period values on each point. incompleteFrom is today in the GA property’s time zone; days from it onward are still being collected.

Authorizations

Authorization
string
header
required

Your SnowSEO API key (sk_...).

Query Parameters

teamId
string

Team ID

days
integer
default:30

Days back from today on the team's calendar, converted to startDate/endDate. Ignored when startDate or endDate is set. Defaults to 30.

Required range: x >= 1
startDate
string

Start date (YYYY-MM-DD)

endDate
string

End date (YYYY-MM-DD)

country
string

Country filter

filters

Additional dimension filters

includePrevious
string

Include previous-period comparison values alongside each data point (roughly doubles the time-series payload). Defaults to false.

Response

Default Response

chartData
object[]
required
previousTotals
object | null

Totals for the whole previous period. Use these for change %, not a sum of the prev* points: a previous month can have more days than the chart pairs.

incompleteFrom
string | null

Today on the provider's own calendar (YYYY-MM-DD). Days from here on are still being collected. Null when the provider's time zone is unknown.