seo-connect
POST /v1/seo-connection/google/analytics
GA4 landing-page sessions, key events and revenue for the chosen property. Free.
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
| Name | Type | Required | What it is |
|---|---|---|---|
dateRanges | object[] | Yes | — |
dimensions | string<date, landingPage, landingPagePlusQueryString, pagePath, sessionDefaultChannelGroup, sessionSource, sessionMedium, country, deviceCategory>[] | No | — |
metrics | string<sessions, engagedSessions, totalUsers, newUsers, keyEvents, conversions, totalRevenue, purchaseRevenue, ecommercePurchases, screenPageViews, bounceRate, engagementRate, averageSessionDuration, totalAdRevenue, publisherAdClicks, publisherAdImpressions>[] | Yes | totalAdRevenue, publisherAdClicks and publisherAdImpressions are filled when the property is linked to AdSense (zs-711). |
channel | string | No | e.g. Organic Search. |
ai_referrals | boolean | No | Only sessions an AI assistant sent (ChatGPT, Perplexity, Gemini, Copilot, Claude, DeepSeek, Meta AI), matched on sessionSource by one fixed pattern (zs-708). Replaces channel. |
limit | integer | No | — |
offset | integer | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
property | string | Yes | — |
rows | object[] | Yes | — |
row_count | integer | Yes | — |
currency | string | Yes | — |
Errors this endpoint can return
401 · 403 · 409 · 422 · 429 · 503