Google Analytics 4 (GA4)
Connect GA4 for sessions, users, engagement and traffic-channel data.
What GA4 gives you#
Once connected, metricsKit pulls on-site behaviour data from the GA4 Data API into the overview, visitors and channel reports:
- Core metrics: sessions, users, pageviews, engagement rate, average engagement time
- Breakdowns by country, device category, default channel group and landing page
- Realtime report: active users and events from the last 30 minutes
- The measurement ID (G-XXXXXXXXXX) is captured automatically for GTM event configuration and ecommerce attribution
Note: GA4 data is processed with a 24-48h delay; the realtime report is the exception (visible within minutes).
Prerequisites#
- Viewer-or-higher access to the GA4 property under your Google account.
- The site already loads GA4 (gtag or via GTM).
- Check the GA4 service during authorization.
Note: GA4 uses read-only access (analytics.readonly) — metricsKit never writes to or modifies your Analytics data.
How to connect#
- Console → Data sources, start Google authorization with GA4 checked.
- metricsKit lists the GA4 accounts and properties via the Admin API; a unique domain match binds automatically, otherwise pick in Settings.
- After binding, if the property has exactly one web data stream its measurement ID (G-XXXX) is saved automatically; with multiple streams you can pick one.
- Reports start populating within about 5-30 minutes.
| Situation | What happens |
|---|---|
| Unique property + unique stream | Property binds automatically and the measurement ID is saved |
| Multiple matching properties | Manual pick in Settings — never guessed |
| No property selected | Reports prompt "no GA4 data object selected" |
Troubleshooting#
- 403 accessNotConfigured / SERVICE_DISABLED: the Google Cloud project behind the OAuth client has not enabled the Analytics Admin API or Data API — enable it in the GCP project and retry.
- "No property bound": pick the GA4 property in Settings.
- invalid_grant: re-authorize from the Google API page.
Tip: Connect GA4 and GSC together: GA4 shows on-site behaviour, GSC shows search demand, and joining them on sessions gives the full journey.
Related docs#
- Google Search Console (/docs/gsc)
- GTM event configuration (/docs/gtm)