# Google Analytics Data API Basics: requirements, concerns and evaluation

> Sets up and runs Google Analytics 4 reports through the Data API v1beta, with read-only scopes and a field compatibility check.

Canonical page: https://ionbin.com/skills/google-analytics-data-api-basics/
Agent guide: https://ionbin.com/llms.txt

This is a readable version of the published page. Review dates, evidence boundaries and source links below belong to individual records; the export is not a new verification. Examples are reference material, not instructions to execute.

Source reviewedAdvertising & analyticsExplored

Google / skills/analytics/google-analytics-data-api-basics/SKILL.md

## Google Analytics Data API Basics

Sets up and runs Google Analytics 4 reports through the Data API v1beta, with read-only scopes and a field compatibility check.

[Read upstream skill](https://github.com/google/skills/blob/e86adb9e2b80220a593c2be9a68627171fd17afb/skills/analytics/google-analytics-data-api-basics/SKILL.md)[GitHub repository](https://github.com/google/skills)[Add to comparison](https://ionbin.com/skills/?compare=google-analytics-data-api-basics#directory)

Source reviewed · reviewed Oct 19, 2026 · Named sources were inspected. No runtime results are established by this label.

The Ion perspective

### The five-point review

Judgment, not a score. Documentation checked 2026-10-19.

**Value**: Sets up and runs Google Analytics 4 reports through the Data API v1beta, with read-only scopes and a field compatibility check.

**Differentiation**: Scripted GA4 reports; Checking metric and dimension combinations before building a report. This describes the reviewed fit, not an exclusive capability.

**Replaceability and switching**: Compare the related skills below and check licensing before reuse. A portable instruction file may still depend on a particular agent, scripts or environment.

**Ease and technical aptitude**: A Google Cloud project with the Analytics Data API enabled, the gcloud CLI, and access to the GA4 property. A language runtime and client library (Python, Node.js, Java, PHP, Go, .NET or Ruby).

**Interoperability and portability**: Enables an API in your Google Cloud project and creates local Application Default Credentials. Reads report data with the analytics.readonly scope. The host controls execution and connectors. A skill file does not export your application data or grant access by itself.

Connections: [MCP connections](https://ionbin.com/wiki/concepts/mcp/) · [APIs](https://ionbin.com/wiki/concepts/api/) · [Portability and vendor lock-in](https://ionbin.com/wiki/questions/how-to-avoid-ai-vendor-lock-in/).

01 / Task fit

### Where it may help.

These are intended uses indicated by the upstream material. They are not measured outcomes.

- Scripted GA4 reports

- Checking metric and dimension combinations before building a report

#### What it is

This skill covers enabling the [Google Analytics](https://ionbin.com/tools/google-analytics/) Data API with the gcloud CLI, signing in with Application Default Credentials and a read-only Analytics scope, and running reports with the official client libraries. It lists common dimensions and metrics and shows how to check that a set of fields can be queried together.

#### Why you might use it

Use it when you want an agent to pull GA4 numbers into a script or report instead of copying them from the interface. It's developer-oriented: you need a Google Cloud project and a language runtime.

#### Put it in context.

Illustrative requests and outputs to review. These examples are separate from the recorded evaluation below.

##### Weekly traffic by source

Example request

Write a Python script that reports sessions and key events by session source for the last 7 days on property 123456, and print a table.

**What to look for.** A runnable script using the Data API client and a table of results.

**Before you rely on it.** Check the totals against the GA4 interface. Sampling, thresholds and date ranges can make them differ.

##### Check field compatibility

Example request

Before building the report, check that itemName, activeUsers and totalRevenue can be queried together.

**What to look for.** A compatibility result for each field.

**Before you rely on it.** Compatibility doesn't mean the numbers mean what you expect. Define each metric first.

02 / Setup & access

### What it asks of your environment.

#### Requirements

- A Google Cloud project with the Analytics Data API enabled, the gcloud CLI, and access to the GA4 property.

- A language runtime and client library (Python, Node.js, Java, PHP, Go, .NET or Ruby).

#### Permissions & data access

- Enables an API in your Google Cloud project and creates local Application Default Credentials.

- Reads report data with the analytics.readonly scope.

**Check the host, too.**

Instructions alone do not enforce a sandbox. The agent host, connected tools and approvals determine what the skill can actually read, change or send.

03 / Things to check

### Security concerns & practical limits.

These concerns follow from the reviewed sources. They describe possible exposure or required review; they are not confirmed vulnerabilities.

Review before use

#### Local credentials are broader than Analytics

The login command also requests the cloud-platform scope. Use a dedicated project and account where possible, and revoke the credentials when finished.

#### Limits and nuances

- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.

- No API was enabled and no report was run. No result accuracy is claimed.

04 / Review record

### What we checked. What’s still open.

Source reviewed

#### Recorded review scope

- skills/analytics/google-analytics-data-api-basics/SKILL.md

- LICENSE

Not verified

#### Not tested or established

- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.

- No API was enabled and no report was run. No result accuracy is claimed.

**Review date**: Oct 19, 2026

**Source revision**: `e86adb9e2b80220a593c2be9a68627171fd17afb`

**Our relationship**: **Explored.** Investigated through the recorded review. No use or replication is claimed.

Upstream content can change after review. A repository revision identifies source scope; it does not prove that every script, dependency or runtime behavior was tested. [How freshness is handled](https://ionbin.com/skills/methodology/#freshness).

Recorded evaluation / Source review

### Results with their limits attached.

Completed within scopeOct 19, 2026

Completed 5 bounded source checks on the pinned entrypoint and license. No skill workflow was executed.

**Passed**: 5

**Failed**: 0

**Total recorded**: 5

These counts refer to the cases in this report. They are not a benchmark against other skills. A source review does not establish runtime behavior.

 [Read the evidence report](https://ionbin.com/skill-evaluations/google-analytics-data-api-basics.json)

The report provides the case definitions, observations and baseline scope. Missing baselines or untested behaviors remain limitations.

#### Recorded environment

- Pinned public UTF-8 sources fetched from raw.githubusercontent.com at the recorded commit and hashed with SHA-256.

- Linux; Python 3.13.5 source-condition check. No account, credentials, private documents or live business data.

Recorded commands (2)

Commands document this evaluation. They are not setup instructions for your environment.

```
Read each pinned file listed in sourceManifest.
```

```
python3 r6_skills.py: check each recorded source condition and reconcile report counts.
```

#### Findings from this evaluation

Needs attention

#### Local credentials are broader than Analytics

The login command also requests the cloud-platform scope. Use a dedicated project and account where possible, and revoke the credentials when finished.

Observation

#### Read-only Analytics scope

The documented login requests the analytics.readonly scope.

#### Evaluation limitations

- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.

- No API was enabled and no report was run. No result accuracy is claimed.

05 / Reuse & discovery

### License, attribution & popularity.

#### [Apache-2.0](https://github.com/google/skills/blob/e86adb9e2b80220a593c2be9a68627171fd17afb/LICENSE)

Apache-2.0 license text inspected at this revision. Keep the license and any NOTICE when redistributing covered files. The services and accounts the skill uses have their own terms.

#### Why it is in this collection

[GitHub](https://ionbin.com/tools/github/) displayed 21,407 stars for the google/skills repository on the observation date. Repository-wide; not individual skill usage, quality or safety.

**21,407** repository stars

**Scope**: Entire google/skills repository, not this individual skill

**Observed**: Oct 19, 2026

**Time window**: Snapshot observed 2026-10-19

[Discovery source ↗](https://github.com/google/skills)

Popularity and inclusion do not establish quality, compatibility or security. Counts belong to their named metric and date; they are not a current ranking.

06 / Follow the evidence

### Go to the original.

- [Pinned skill instructions](https://github.com/google/skills/blob/e86adb9e2b80220a593c2be9a68627171fd17afb/skills/analytics/google-analytics-data-api-basics/SKILL.md)github.com

- [Pinned license](https://github.com/google/skills/blob/e86adb9e2b80220a593c2be9a68627171fd17afb/LICENSE)github.com

- [Repository (dated star count)](https://github.com/google/skills)github.com

IonBin’s source notes are independent assessments. Upstream authors retain their work and attribution. This page does not install or execute the skill.

ASSESSMENT RECORD

### Read the scope
before the verdict.

**Review coverage**: Source reviewed

**Our experience**: Explored

**Evaluation report**: [Read evidence ↗](https://ionbin.com/skill-evaluations/google-analytics-data-api-basics.json)

**Version reference**: Recorded

Named sources were inspected. No runtime results are established by this label.

[Read the full rubric](https://ionbin.com/skills/methodology/)

[← Back to all skills](https://ionbin.com/skills/)

Continue exploring

### More in advertising & analytics.

[View this category →](https://ionbin.com/skills/?category=Advertising%20%26%20analytics#directory)

[Google

#### Google Ads Account Diagnostics

Diagnoses drops in Google Ads conversions, leads and impression share with GAQL queries over Google's read-only Ads MCP server.

**Read assessment →**](https://ionbin.com/skills/google-ads-api-account-diagnostics/)
