seo-connect

POST /v1/seo-connection/google/analytics

GA4 landing-page sessions, key events and revenue for the chosen property. Free.

All seo-connect endpoints

All developer docs →

Authentication

This endpoint does not take an API key. It takes its own credential, issued to the plugin or service that calls it, as a bearer token; see the description above.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/seo-connection/google/analytics \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "dateRanges": <object[]>, "metrics": <string<sessions, engagedSessions, totalUsers, newUsers, keyEvents, conversions, totalRevenue, purchaseRevenue, ecommercePurchases, screenPageViews, bounceRate, engagementRate, averageSessionDuration, totalAdRevenue, publisherAdClicks, publisherAdImpressions>[]> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

A GA4 runReport with dimensions and metrics from fixed lists (landing page, date, channel, source, medium, country, device; sessions, engaged sessions, users, key events, revenue, purchases, page views, engagement), up to four date ranges, and an optional channel filter (Organic Search). Reads only: no tracking script is added to the site. Needs the analytics grant and seo.read.

Request body

NameTypeRequiredWhat it is
dateRangesobject[]Yes—
dimensionsstring<date, landingPage, landingPagePlusQueryString, pagePath, sessionDefaultChannelGroup, sessionSource, sessionMedium, country, deviceCategory>[]No—
metricsstring<sessions, engagedSessions, totalUsers, newUsers, keyEvents, conversions, totalRevenue, purchaseRevenue, ecommercePurchases, screenPageViews, bounceRate, engagementRate, averageSessionDuration, totalAdRevenue, publisherAdClicks, publisherAdImpressions>[]YestotalAdRevenue, publisherAdClicks and publisherAdImpressions are filled when the property is linked to AdSense (zs-711).
channelstringNoe.g. Organic Search.
ai_referralsbooleanNoOnly sessions an AI assistant sent (ChatGPT, Perplexity, Gemini, Copilot, Claude, DeepSeek, Meta AI), matched on sessionSource by one fixed pattern (zs-708). Replaces channel.
limitintegerNo—
offsetintegerNo—

Response

NameTypeRequiredWhat it is
propertystringYes—
rowsobject[]Yes—
row_countintegerYes—
currencystringYes—

Errors this endpoint can return

401 · 403 · 409 · 422 · 429 · 503