Google Analytics
AnalyticsConnect a GA4 property and read its reports, realtime data and available dimensions and metrics through the Zernio API.
Authentication details
Connecting accounts guideOAuth 2.0 (Google)
Connect endpoints
GET /v1/connect/googleanalyticsGet Google Analytics OAuth connect URLGET /v1/connect/googleanalytics/propertiesList Google Analytics properties for a pending connectPOST /v1/connect/googleanalytics/select-propertyConnect the chosen Google Analytics property
Connect a Google Analytics 4 property to a profile and read its reports with your Zernio API key. A connected account uses platform: "googleanalytics" and represents one GA4 property. It reads data only and never posts.
Quick reference
| Property | Value |
|---|---|
| Platform value | googleanalytics |
| What it reads | GA4 reports, realtime reports, and the property's dimensions and metrics |
| Auth | OAuth 2.0 with a Google account |
| Scope | https://www.googleapis.com/auth/analytics.readonly |
| Properties per account | One. Connect another property to a different profile |
| Report caching | 10 minutes for reports, 1 hour for metadata, none for realtime |
| Social posting | No |
| List the accounts | GET /v1/accounts?category=analytics |
Before you start
The person connecting needs a Google account with at least Viewer access to a GA4 property. Universal Analytics properties are not supported.
Connect
Call GET /v1/connect/googleanalytics with the profile and send the user to the returned authUrl. If their Google account reads several properties, they pick one on a Zernio page. See Connect.
Common errors
| Error | Cause | Fix |
|---|---|---|
googleanalytics_scope_missing on the redirect | The user unticked the Analytics permission on Google's consent screen | Connect again and keep the permission ticked. |
400 on a report | A dimension or metric name is wrong; Google's message names it | List valid names with the metadata endpoint. |
429 with rate_limited | Google's quota for the property is used up | Wait for the quota to refill. |
In this section
Connect
Connect a GA4 property to a profile with Google sign-in, from the dashboard or with the connect API.
Reports
Run GA4 reports and realtime reports on a connected property, and list the dimensions and metrics it supports.
Limits & errors
What the Google Analytics connection does not do, its quotas, and the common errors when connecting a property or running a report.
Related
Google Analytics
6- POST
- POST
- GET
- GET
- GET
- POST
Nothing matches that search.