canonical: https://jentic.com/apis/googleapis.com/analytics

# Google Analytics API

The Google Analytics API v3 (Universal Analytics) exposes both reporting and management for Universal Analytics properties - the predecessor to GA4. It covers the Core Reporting API, Multi-Channel Funnels (MCF), Real Time, and the Management API for accounts, web properties, profiles (views), goals, filters, and user permissions. Universal Analytics stopped processing new data in 2023, so this API is now used primarily to read historical data and to manage legacy property metadata. New analytics work should target the GA4 Admin and Data APIs.

## For AI agents

Read historical Universal Analytics report data and manage UA accounts, properties, views, goals, and filters across 88 endpoints.

## Scope

Does not query GA4 properties, configure GA4 streams, or send measurement events - use for Universal Analytics reporting and management only.

## Capabilities

- Run Core Reporting queries against historical Universal Analytics data with dimensions and metrics
- Run Multi-Channel Funnels (MCF) reports for attribution analysis on historical sessions
- Manage UA accounts, web properties, and profiles (views) including their hierarchical relationships
- Configure goals, filters, and unsampled report definitions on UA properties
- Manage entity user links to grant or revoke UA account, property, and view access
- List and read realtime reports for any UA properties still receiving traffic during transition windows
- Read account summaries to discover the full UA account, property, and view tree at once

## Use cases

### Historical Universal Analytics Reporting

Teams that ran Universal Analytics for years still need to query that history for year-over-year comparisons even after migrating to GA4. The Core Reporting endpoint /data/ga returns dimensions and metrics for a specified UA view ID and date range, and Multi-Channel Funnels at /data/mcf returns attribution paths. This is the only programmatic surface for UA historical data - GA4's Data API does not cover UA properties.

Example prompt: GET /data/ga with ids=ga:{viewId}, start-date and end-date, dimensions=ga:source,ga:medium and metrics=ga:sessions,ga:pageviews and write the rows to a warehouse table.

### UA Property Inventory and Cleanup

Organisations migrating to GA4 need a clean inventory of every UA account, property, and view, and a way to revoke obsolete user access during sunset. /management/accountSummaries returns the full hierarchy in one call. The accounts, webproperties, profiles, and entityUserLinks paths support listing and (where allowed) updating these resources.

Example prompt: GET /management/accountSummaries and write the account, webPropertyId, and profileId tree to a CSV, then call entityUserLinks to list current users on each.

### Goal and Filter Audit

Before retiring a Universal Analytics property, teams want to capture every goal and filter definition for institutional knowledge. The Management API exposes goals and filters per profile or account. A script can iterate accounts, properties, and views, capture the configured goals and filters, and store them as JSON for the GA4 migration team to translate.

Example prompt: List accounts, then iterate webProperties and profiles, calling /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals and the filters endpoint to capture every definition.

### Agent Pull of Historical UA Reports

An agent integrating the Google Analytics v3 API through Jentic can run Core Reporting queries against historical UA data and answer questions about long-term trends. Jentic stores the OAuth credential and exposes the report request schema, so the agent does not have to write the OAuth dance or learn UA's metric and dimension naming by hand.

Example prompt: Use the Jentic search query 'run a Universal Analytics core reporting query' to discover /data/ga, then call it for a UA view ID with the requested dimensions, metrics, and date range.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /data/ga | Run a Core Reporting query against a UA view |
| GET | /data/mcf | Run a Multi-Channel Funnels report |
| GET | /data/realtime | Run a real-time report |
| GET | /management/accountSummaries | List the UA account, property, and view hierarchy in one call |
| GET | /management/accounts | List UA accounts the caller can access |

## Key resources

- **Core Reporting (/data/ga)** — Dimension/metric reporting for historical UA sessions
- **Multi-Channel Funnels (/data/mcf)** — Attribution path reporting on historical UA data
- **Realtime (/data/realtime)** — Real-time hit data for any UA properties still receiving traffic
- **Accounts / Web Properties / Profiles** — Management API hierarchy for UA accounts, properties, and views
- **Goals / Filters / Unsampled Reports** — Configuration objects attached to UA views
- **Entity User Links** — User permissions on UA accounts, properties, and views

## Why Jentic

- **Setup:** Wiring the Google Analytics API by hand means setting up Google OAuth 2.0, minting short-lived access tokens from a refresh token, and pointing Universal Analytics calls at the analytics.googleapis.com host with the analytics.v3 path. Through Jentic you install once, import the Google Analytics API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** The Universal Analytics surface carries the reporting query in the request body and management ids in the path, so limit the agent to the operations it needs, such as reading core reporting data or listing account summaries. You choose the operations it may call, so management writes are not included unless you add them.
- **Credential handling:** Your Google OAuth credential is stored once, encrypted, by your own Jentic One instance and exchanged for short-lived access tokens at execution time. The client secret and refresh token never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a Universal Analytics core reporting query' or 'list UA goals', and Jentic returns the matching Google Analytics operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Google Analytics Data API** — Data API queries GA4 property reports; UA v3 queries Universal Analytics historical data.
- **Google Analytics Admin API** — Admin API manages GA4 account and property configuration; UA v3 manages legacy Universal Analytics configuration.

## FAQ

### What authentication does the Google Analytics v3 API use?

OAuth 2.0 with the analytics or analytics.readonly scopes. Jentic stores the OAuth refresh token in its encrypted vault and gives the agent only short-lived access tokens, so credentials never enter agent context.

### Does this API let me query GA4 properties?

No. This is Universal Analytics (v3); GA4 properties are accessed via the Google Analytics Admin API (analyticsadmin) and the Google Analytics Data API (analyticsdata). Use this API only for historical UA data and UA property management.

### What are the rate limits for the Google Analytics v3 API?

Universal Analytics enforces per-project, per-view, and per-second quotas on the Core Reporting and Management APIs. Default quotas are 50,000 requests per project per day for the Core Reporting API. Quotas are listed in IAM and Admin, Quotas under the Google Analytics API in the Cloud Console.

### How do I run a Core Reporting query through Jentic?

Search Jentic for 'run a Universal Analytics core reporting query', load the schema for /data/ga, and execute it with ids=ga:{viewId}, start-date, end-date, dimensions, and metrics. Run pip install jentic and use the async search, load, execute pattern.

### Is Universal Analytics still processing new data?

No. Standard Universal Analytics properties stopped processing new hits on 1 July 2023. This API now serves historical UA data and management of legacy property metadata; new analytics implementations should target GA4 via analyticsadmin and analyticsdata.

### Can I limit what my agent is allowed to do with the Google Analytics API?

Yes. Because your Jentic One instance is self-hosted, your own rules decide which of the 88 Universal Analytics operations the agent may call, so you can allow it to read core reporting data at /data/ga or list account summaries at /management/accountSummaries while withholding everything else. Management writes such as updating accounts, goals, filters, or entityUserLinks are not included unless you add them. You also control which OAuth credential and scopes the agent may use, so a reporting agent can be restricted to read-only access.
