ga4-data-api-query
Installation
SKILL.md
GA4 Data API v1 — runReport
Overview
The Data API v1 is the canonical read path for GA4. One endpoint (runReport) covers most use cases. Two paths matter for picking the right query: dimensions describe rows (date, page, source), metrics describe values (sessions, users, events). Not every combination is valid — see "Compatibility" below.
Prerequisite: auth working (see ga4-auth-setup).
Prerequisites
- An authenticated GA4 Data API client with access to the target property; follow
ga4-auth-setupfirst. - Python and the
google-analytics-datapackage. - A numeric GA4 property ID and a bounded date range appropriate to the metric's freshness.